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)
This commit is contained in:
2026-11-21 23:39:25 +01:00
parent 02675a43ea
commit a75d86236b
5 changed files with 55 additions and 37 deletions
+2
View File
@@ -212,6 +212,8 @@ type Conn struct {
bound map[string]*binding
// bind binds one bucket: jetstream's KeyValue (a stream-info request on the bus) unless a test replaces it.
bind func(ctx context.Context, bucket string) (jetstream.KeyValue, error)
// pulls are the workers bound and the messages pulled on this connection (seat_pull.go).
pulls pulls
}
// answered is one subject the runtime answers on: what to subscribe again with, and how often it was