Repository navigation
Commit 1fc5966
authored
test(faucet): a run past the lease sends no gap or delivery again (#35)
* test(faucet): lapse every lease before the gap exactly-once checks
A gap that a run counted as sent but never finished goes out again once its 30 s DeliveryLease lapses. The two gap tests never moved the clock past a lease, so no run could send a gap twice, and requireEachGapSentOnce could not see it.
Both tests now advance past DeliveryLease and run DeliverDue once more before the checks, so the helper's claim that no run sends a gap again is checked.
---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-sonnet-5-5` • Thinking: `xhigh`_
* test(faucet): make lapseEveryLease check its own run
The helper ran deliverDue once more past DeliveryLease and dropped the
result. That run could send a gap that an earlier run counted as sent and
never finished, and the receiver then saw exactly one envelope, so a
mutant that counted the first claim of each slow gap without a request or
FinishGap passed both tests.
After a correct run nothing is left to send. Require the lapse run to
count no gap.
---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-sonnet-5-5` • Thinking: `xhigh`_
* test(faucet): check the receivers before the lease-lapse run too
The lapse run could send the one request that hid a gap an earlier run
counted and never sent. Checking what the receivers saw before it keeps
main's check intact, so the lapse run can only add a failure.
---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
* test(faucet): drop the lease-lapse run from the fairness tests
The extra DeliverDue run let the tests repair defects that main's checks
already catch. Return fairness_test.go to main's version.
* test(faucet): a run past the lease sends no gap or delivery again
A gap or a delivery that a run counts as sent but never finishes keeps
its lease, and the first run after DeliveryLease sends it again. Queue
gaps and deliveries, run once, check the receivers and the books, then
run past the lease and require that nothing is claimed or sent.
* test(faucet): word the lease-lapse assertions without colons1 parent 475148a commit 1fc5966
1 file changed
Lines changed: 57 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
495 | 552 | | |
496 | 553 | | |
497 | 554 | | |
| |||
0 commit comments