Commit 2114153
fix(tests): address recurring flaky test failures in subscription-replay, MQTT, and multi-threaded suites
- subscriptionReplay race-condition tests: the collect() quiet-period timer could expire
before in-flight writes committed, silently dropping events. Switch to attach-listener-
first then await-writes then fixed-drain pattern so all committed events are captured.
- MQTT mTLS tests: authorised client connect was missing rejectUnauthorized:false, causing
intermittent "self-signed certificate in certificate chain" failures on loaded runners.
The tests exercise server-side mTLS (server rejects clients without a cert), not
client-side server-cert validation. Add explicit per-test timeout (20 s) and internal
15 s reject path to the QoS=1 durable-session reconnect test.
- multi-threaded cache test: assertions targeted specific IDs whose write counts were
sensitive to the seeded PRNG's non-uniform distribution. Aggregate across all IDs 20-29
so no single ID's count can cause a false failure.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 3ea6d76 commit 2114153
3 files changed
Lines changed: 66 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
548 | | - | |
549 | 548 | | |
550 | 549 | | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
551 | 554 | | |
552 | 555 | | |
553 | 556 | | |
| |||
607 | 610 | | |
608 | 611 | | |
609 | 612 | | |
610 | | - | |
611 | 613 | | |
612 | 614 | | |
| 615 | + | |
| 616 | + | |
613 | 617 | | |
614 | 618 | | |
615 | 619 | | |
| |||
812 | 816 | | |
813 | 817 | | |
814 | 818 | | |
| 819 | + | |
815 | 820 | | |
816 | 821 | | |
817 | 822 | | |
| |||
895 | 900 | | |
896 | 901 | | |
897 | 902 | | |
898 | | - | |
| 903 | + | |
899 | 904 | | |
900 | 905 | | |
901 | 906 | | |
902 | 907 | | |
903 | 908 | | |
904 | 909 | | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
905 | 916 | | |
906 | 917 | | |
907 | 918 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
75 | 97 | | |
76 | 98 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
318 | 322 | | |
| 323 | + | |
319 | 324 | | |
320 | 325 | | |
321 | 326 | | |
| |||
345 | 350 | | |
346 | 351 | | |
347 | 352 | | |
348 | | - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
349 | 358 | | |
| 359 | + | |
350 | 360 | | |
351 | 361 | | |
352 | 362 | | |
| |||
472 | 482 | | |
473 | 483 | | |
474 | 484 | | |
475 | | - | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
476 | 489 | | |
| 490 | + | |
477 | 491 | | |
478 | 492 | | |
479 | 493 | | |
| |||
0 commit comments