Commit 4b479e6
fix: prevent race condition in CA ID generation during tests
IAppConfig uses per-process cache, causing race conditions when CLI
commands and HTTP requests execute simultaneously during Behat tests.
The CLI generates a ca_id, but HTTP requests see an empty cache and
generate a different ca_id, overwriting the CLI value.
Solution:
- Detect debug mode (automatically set during Behat tests)
- Apply file lock + cache clear workaround only in debug mode
- Production code remains unchanged for optimal performance
This fix resolves test failures in features/sign/request.feature:28
and features/sign/request.feature:61 where setup validation was
failing due to mismatched certificate paths.
Signed-off-by: Vitor Mattos <[email protected]>1 parent e51a915 commit 4b479e6
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
145 | 152 | | |
146 | 153 | | |
147 | 154 | | |
| |||
0 commit comments