Commit 2a8c707
committed
test: stop global spring.profiles.active pollution that flaked RegistrationGuard wiring tests
BaseTestConfiguration set spring.profiles.active=test via System.setProperty,
a JVM-global mutation that leaked across the parallel test suite. When it raced
ahead of RegistrationGuardConfigurationTest — which runs an ApplicationContextRunner
with no profile and gates its consumer-guard configs on @Profile("!test") — the
test profile suppressed those guards, so DefaultRegistrationGuard was registered
and two wiring assertions failed (intermittently; surfaced on the Java 25 run).
The property was redundant: every test annotation and direct consumer already
declares @activeprofiles("test"), and ddl-auto/datasource are set in the test
properties files. Removed the TestPropertySourcesConfigurer entirely.
Also pinned RegistrationGuardConfigurationTest's runner to a non-test profile via
withPropertyValues so it stays deterministic against any future ambient leak.1 parent 7d05a8c commit 2a8c707
2 files changed
Lines changed: 7 additions & 20 deletions
File tree
- src/test/java/com/digitalsanctuary/spring/user
- registration
- test/config
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
35 | 41 | | |
| 42 | + | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
| |||
Lines changed: 0 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | 86 | | |
0 commit comments