Commit c644aaf
committed
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 <1079143+vitormattos@users.noreply.github.com>1 parent 45806e1 commit c644aaf
1 file changed
+39
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
147 | 154 | | |
148 | 155 | | |
149 | 156 | | |
150 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
151 | 189 | | |
152 | 190 | | |
153 | 191 | | |
| |||
0 commit comments