Commit 46b77c3
committed
test(daemon-app): wait for the stable terminal state, not the draining window
The fresh-request guard test waited for 'job terminal AND >= N/2 subscribers
still attached'. Publish flips terminal and releases the blocked prior
requests in the same locked step, so that conjunction is a transient window
whose width is thread-wakeup scheduling: the busy-spin caught it by luck,
a 1ms-yield poll (#1307) sampled past it on fast x64 runners, and no budget
can pin it (release runs 30305464193 and 30309182389 failed it from both
directions).
The production guard never consults subscriber counts —
application_find_active_job_locked skips any terminal job — and the test's
downstream assertions (starts==2, destroys==2, stale/fresh response
separation) catch a terminal-job reuse in every interleaving. So wait only
for the stable end-state (active jobs == 0) and drop the racy helper.
47/47 locally.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>1 parent 0abd5c6 commit 46b77c3
1 file changed
Lines changed: 12 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1462 | 1462 | | |
1463 | 1463 | | |
1464 | 1464 | | |
1465 | | - | |
1466 | | - | |
1467 | | - | |
1468 | | - | |
1469 | | - | |
1470 | | - | |
1471 | | - | |
1472 | | - | |
1473 | | - | |
1474 | | - | |
1475 | | - | |
1476 | | - | |
1477 | | - | |
1478 | | - | |
1479 | | - | |
1480 | | - | |
1481 | | - | |
1482 | 1465 | | |
1483 | 1466 | | |
1484 | 1467 | | |
| |||
2646 | 2629 | | |
2647 | 2630 | | |
2648 | 2631 | | |
2649 | | - | |
2650 | | - | |
2651 | | - | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
| 2639 | + | |
2652 | 2640 | | |
2653 | 2641 | | |
2654 | 2642 | | |
2655 | 2643 | | |
2656 | | - | |
2657 | | - | |
2658 | | - | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
2659 | 2647 | | |
2660 | 2648 | | |
2661 | 2649 | | |
| |||
2672 | 2660 | | |
2673 | 2661 | | |
2674 | 2662 | | |
2675 | | - | |
| 2663 | + | |
2676 | 2664 | | |
2677 | 2665 | | |
2678 | 2666 | | |
| |||
0 commit comments