Commit b3c1f58
committed
fix(tests): resolve flaky FailedJob_CanBeRetried test
Replace fixed Task.Delay(200) calls with proper synchronization using
TaskCompletionSource signals. The test was failing on slow CI machines
because 200ms wasn't enough time for job processing to complete before
the retry was enqueued.
The handler now exposes FirstInvocationCompleted and SecondInvocationCompleted
tasks that the test awaits with a 5-second timeout, making the test
deterministic regardless of machine speed.1 parent ec457ca commit b3c1f58
File tree
1 file changed
+23
-2
lines changed- tests/Octopus.Server.Processing.Tests
1 file changed
+23
-2
lines changedLines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
274 | 277 | | |
275 | 278 | | |
276 | 279 | | |
| |||
282 | 285 | | |
283 | 286 | | |
284 | 287 | | |
285 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
286 | 292 | | |
287 | 293 | | |
288 | 294 | | |
| |||
313 | 319 | | |
314 | 320 | | |
315 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
316 | 335 | | |
317 | 336 | | |
318 | 337 | | |
319 | 338 | | |
320 | 339 | | |
| 340 | + | |
321 | 341 | | |
322 | 342 | | |
| 343 | + | |
323 | 344 | | |
324 | 345 | | |
325 | 346 | | |
| |||
0 commit comments