refactor: adopt feature package boundaries and JPA
This commit is contained in:
@@ -3,16 +3,16 @@
|
||||
- **Test type:** Integration
|
||||
- **Requirement IDs:** `ACC-001–ACC-004, SEC-001–SEC-002, GOV-013`
|
||||
- **Scenario IDs:** `AC-ACC-001, AC-ACC-002, AC-SEC-001`
|
||||
- **Test class/method:** `com.lab.labtimesheet.BootstrapIntegrationTest`
|
||||
- **Test class/method:** `com.lab.labtimesheet.feature.account.service.BootstrapIntegrationTest`
|
||||
- **Implementation commit:** `this milestone commit`
|
||||
|
||||
## Protected behavior
|
||||
|
||||
Before initialization only bootstrap and health are reachable. Concurrent valid submissions create exactly one active Admin, atomically persist initialization, and permanently close bootstrap.
|
||||
Before initialization only bootstrap and health are reachable. Concurrent valid submissions create exactly one active Admin, atomically persist initialization, and permanently close bootstrap. The public account service resolves the winning Admin by normalized email or ID without exposing JPA entities or repositories.
|
||||
|
||||
## Test method
|
||||
|
||||
A PostgreSQL 18.4 integration test releases two Java 25 virtual-thread-safe requests onto the same service concurrently and asserts the row-locked outcomes and database state. MockMvc checks pre/post-bootstrap route exposure.
|
||||
A PostgreSQL 18.4 integration test releases two Java 25 virtual-thread-safe requests onto the same service concurrently and asserts the row-locked outcomes and database state through Spring Data JPA. MockMvc checks pre/post-bootstrap route exposure, and the account API is checked against the actual concurrent winner.
|
||||
|
||||
## Hand-derived expected result
|
||||
|
||||
@@ -26,7 +26,7 @@ Two simultaneous submissions produce one `CREATED`, one `ALREADY_INITIALIZED`, o
|
||||
export JAVA_HOME=/opt/homebrew/opt/openjdk@25
|
||||
export PATH="$JAVA_HOME/bin:/opt/homebrew/opt/node@24/bin:$PATH"
|
||||
export DOCKER_HOST=unix:///Users/sechmachine/.orbstack/run/docker.sock
|
||||
./mvnw -Dtest=BootstrapIntegrationTest,SmtpAccountIntegrationTest test
|
||||
./mvnw -Dtest=BootstrapIntegrationTest test
|
||||
```
|
||||
|
||||
**Observed result**
|
||||
@@ -53,7 +53,7 @@ export DOCKER_HOST=unix:///Users/sechmachine/.orbstack/run/docker.sock
|
||||
**Observed result**
|
||||
|
||||
```text
|
||||
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
|
||||
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
|
||||
BUILD SUCCESS
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user