node-tools: an integration test's wait on the bus takes the test's own deadline, never a few fixed seconds (issue 1754) #92

Merged
mesh-tools merged 2 commits from fix/1754-node-tools-waits into main 2026-11-23 19:19:08 +00:00
Member

Issue 1754 notes 8-11 (1754/AC1-AC4): two node-tools integration tests failed main.505's integration step on loaded build nodes at 309069de, which had passed every step in main.500: TestAStaleWriteIsRefusedAndWritesNothing (a 5 s wait on a 1 s key's expiry) and TestARunnerAtItsStopAnswersNoCallAndItsCallersMeetNoResponders. The second meeting of the kind after 3850eb8.

  • 6a1b4817: the waits on a bus event or expiry in node-tools' integration tests take one shared bound; a guard test refuses a fixed bound (1754/AC1-AC4).
  • 56d20314: review round 1: the shared bound is meshtest.Bound(t), the test's own deadline less 30 s, or what is left (lead answers on notes 10 and 11; principles 11, 7, 3); each 'ended quickly' limit is half the bound it tells apart.

Tests only.

Reviewed-by: lead-47@shanks at 56d20314ba

Issue 1754 notes 8-11 (1754/AC1-AC4): two node-tools integration tests failed main.505's integration step on loaded build nodes at 309069de, which had passed every step in main.500: TestAStaleWriteIsRefusedAndWritesNothing (a 5 s wait on a 1 s key's expiry) and TestARunnerAtItsStopAnswersNoCallAndItsCallersMeetNoResponders. The second meeting of the kind after 3850eb8. - 6a1b4817: the waits on a bus event or expiry in node-tools' integration tests take one shared bound; a guard test refuses a fixed bound (1754/AC1-AC4). - 56d20314: review round 1: the shared bound is meshtest.Bound(t), the test's own deadline less 30 s, or what is left (lead answers on notes 10 and 11; principles 11, 7, 3); each 'ended quickly' limit is half the bound it tells apart. Tests only. Reviewed-by: lead-47@shanks at 56d20314ba89df7a1f7c607e10f6ee9be1342c70
mesh-tools added 2 commits 2026-11-23 19:19:03 +00:00
TestAStaleWriteIsRefusedAndWritesNothing gave the watch 5 s to hear a 1 s
key's expire and failed main.505's integration step on a loaded build node;
TestARunnerAtItsStopAnswersNoCallAndItsCallersMeetNoResponders failed its
rerun while it asked 1 s of two round trips and 5 s and 10 s of its waits.
The second of a kind after 3850eb8, so the kind is fixed: meshtest.Bound
(30 s, Until's bound, named once) is what every node-tools test that starts
a bus waits for what the bus carries; Until becomes a deadline of it, so a
try that waits does not multiply it; an upper bound on how long a call or a
wait took is half the bound it tells apart (bus.RequestTimeout, the call's
or the wait's own), at most meshtest.Bound. A wait that hears ends then: no
passing test is longer (per-test durations before and after, equal).

A guard (meshtest waits_test.go) reads every test file that imports
meshtest and refuses a wait whose constant bound is a second or more under
meshtest.Bound; it names 34 such waits at 309069de.

Builds: issue 1754 note 8 (the quick fix), note 9 (1754/AC1 to AC4); principle 11
The lead's answer on issue 1754 (note of 2026-11-23 20:00, principles 11
and 7): no bound written into the code. meshtest.Bound(t) is t.Deadline()
less 30 s for the test's cleanup, go test's default of 10 min where a run
names no deadline, and what is left, at least 1 ms, once less than the
margin is (the lead's round-2 answer, note 11; principles 3 and 7). Until
stops at it; callWithin is gone, call() takes it. The guard now refuses
any constant bound of a second or more.

Each upper limit is half the bound it tells apart: the watch's refusal is
held to half the default StateTimeout the test replaced (a watch timer
fixed at 10 s failed it in 10.0 s, round 1 passed it); the console's close
to half its backstop ShutdownWithin (a Close that never cancels failed it
in 5.1 s, round 1 passed it); the console waits to half WaitDefault.

Builds: issue 1754 notes 10 (lead answer, 20:00) and 11 (round 2: margin, AC1, AC4); principles 3, 7 and 11
mesh-tools merged commit 393449e840 into main 2026-11-23 19:19:08 +00:00
mesh-tools deleted branch fix/1754-node-tools-waits 2026-11-23 19:19:08 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-tools#92