Commit 159dc03
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 7ea8ef3 commit 159dc03
4 files changed
Lines changed: 397 additions & 265 deletions
File tree
- extension/queue/mysql
- test/integration/extension/queue/mysql
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| |||
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| 86 | + | |
82 | 87 | | |
83 | 88 | | |
84 | 89 | | |
| |||
| 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 | + | |
312 | 340 | | |
313 | 341 | | |
314 | 342 | | |
| |||
476 | 504 | | |
477 | 505 | | |
478 | 506 | | |
| 507 | + | |
479 | 508 | | |
480 | 509 | | |
481 | 510 | | |
| |||
490 | 519 | | |
491 | 520 | | |
492 | 521 | | |
| 522 | + | |
493 | 523 | | |
494 | 524 | | |
495 | 525 | | |
496 | 526 | | |
497 | 527 | | |
| 528 | + | |
498 | 529 | | |
499 | 530 | | |
500 | 531 | | |
| |||
705 | 736 | | |
706 | 737 | | |
707 | 738 | | |
| 739 | + | |
708 | 740 | | |
709 | 741 | | |
710 | 742 | | |
| |||
| 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