Commit cedec95
committed
refactor(queue/mysql): eliminate all time-based waiting in integration tests
Replace 13 time.Sleep, 8 require.Eventually, and ad-hoc time.After
assertions with event-driven hooks. Add OnSignal channel to subscriber
with typed HookSignal values (SignalDeliveryCheck, SignalPartitionUpdate)
named after behavioral concerns rather than implementation details.
Test helpers (waitForSignal, assertNoDelivery, waitForCondition) use
the signal channel with a 10s safety-net timeout. Zero sleeps remain
in test bodies.1 parent a810586 commit cedec95
4 files changed
Lines changed: 403 additions & 268 deletions
File tree
- extension/queue/mysql
- test/integration/extension/queue/mysql
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
| 85 | + | |
81 | 86 | | |
82 | 87 | | |
83 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
58 | 73 | | |
59 | 74 | | |
60 | 75 | | |
| |||
69 | 84 | | |
70 | 85 | | |
71 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
72 | 91 | | |
73 | 92 | | |
74 | 93 | | |
| |||
309 | 328 | | |
310 | 329 | | |
311 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
312 | 341 | | |
313 | 342 | | |
314 | 343 | | |
| |||
474 | 503 | | |
475 | 504 | | |
476 | 505 | | |
| 506 | + | |
477 | 507 | | |
478 | 508 | | |
479 | 509 | | |
| |||
488 | 518 | | |
489 | 519 | | |
490 | 520 | | |
| 521 | + | |
491 | 522 | | |
492 | 523 | | |
493 | 524 | | |
494 | 525 | | |
495 | 526 | | |
| 527 | + | |
496 | 528 | | |
497 | 529 | | |
498 | 530 | | |
| |||
703 | 735 | | |
704 | 736 | | |
705 | 737 | | |
| 738 | + | |
706 | 739 | | |
707 | 740 | | |
708 | 741 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
0 commit comments