The tool runner's bus tests wait on the bus's events, not on process state or time (H-A-363) #87

Merged
mesh-tools merged 4 commits from fix/47-H1-node-tools-bus-tests into main 2026-11-21 23:24:09 +00:00
4 Commits
Author SHA1 Message Date
jschoubben 4f265fe884 Tool runner tests: Until's bound is 30 s, for every package that waits on the bus
The bus package waited within Until's fixed 5 s eighteen more times, the kind
the per-node test's fix names; raised in its one place, Until in meshtest,
which runtime, console, firstview and provide wait with too. The bound only
ends a wait that never hears what it waits for.

Builds: design 47 H H-A-363 (fix-a-bug-met-twice: a fixed bound a loaded machine overruns)
2026-11-22 00:18:42 +01:00
jschoubben 0e03495757 Tool runner bus: the per-node state test waits on the watch, not a 5 s poll
Under load TestAPerNodeStateIsServedAcrossEveryNodesBucket failed 2 of 30: a
bucket made during the watch is taken in on the bus's creation advisory, which a
loaded machine delivers after mt.Until's fixed five seconds. The test now waits
as the watch hands each change over, bounded only for a watch that never hears.

Builds: design 47 H H-A-363 (fix-a-bug-met-twice: a fixed bound a loaded machine overruns)
2026-11-22 00:03:42 +01:00
jschoubben 537e44eff6 Tool runner bus: long-lived loops read their settings once, as they start
A hearing's loops, SeatTake's heartbeat and followGrants' retry loop outlive the
call that started them and read the package's settings on every turn; a test
that sets a setting back as it ends then raced the loop (the race detector:
streams_test.go:232's cleanup write of RebindEvery against the rebind loop's
read, in TestAConsumerNamedBeforeItExistsIsBoundOnceItDoes at -count=30). Each
loop now takes RebindEvery, NakDelay, EventHeartbeat, WorkHeartbeat,
GrantsRetry, GrantsRetryMost, GrantsPatience and StateTimeout once, as consumes
already took IdleHeartbeat and its tick hook.

Builds: design 47 H H-A-363 (fix-a-bug-met-twice: a goroutine outliving its settings)
2026-11-21 23:40:18 +01:00
jschoubben a75d86236b Tool runner bus: pulled workers belong to their connection; two tests wait for what they assert
A worker bound for a pull was kept for the process, so a later connection's pull
used a worker bound on a closed connection and answered "connection closed"
(every run of TestAHolderPullsOneMessageWhenItHasRoom after the first). The
bound workers and the pulled messages are now the Conn's.

The two tests that failed main.165 and main.115 asserted on bus figures before
the bus had delivered them: the worker's pending count right after a publish, a
no-wait pull right after a publish, a callback counter read when a flush
returned, a 300 ms delay and a 2 s ack wait a loaded machine overruns. They now
count binds on a channel the watcher's reader fills, pull with a wait that ends
at the delivery, prove "nothing fetched ahead" by the second message's first
delivery, and use bounds a loaded machine stays within.

Builds: design 47 H H-A-363 (fix-a-bug-met-twice; whole-module tests under load, H-A-327)
2026-11-21 23:39:25 +01:00