Teller test bed: answer who holds operator-channel, so a catch-up does not hold the asks' watch
The want-of-room test failed most runs since 20 Nov: the teller's picture of the assigner's asks hands the first ask on twice (its first view, then again), and the second sight of an open asking catches up with the router's record, which first asks the seat mesh-module-assigner's assignments who holds operator-channel. The bed neither granted nor answered that call, so it waited out its call timeout on the watch's goroutine, and the second ask, written meanwhile, was not raised within the test's 10 s. The bed now grants and answers the call as the live seat does, naming ops-router, so the catch-up reads ops-router_asks at once (20 of 20 runs pass, were 0 of 20 locally). issue 1960 (H1), test stability. Builds: design 47 G §570 (issue 1610 AC1, the refused ask asked again), §717
This commit is contained in:
@@ -120,6 +120,10 @@ func fullConf(dir string) string {
|
||||
teller = append(append(teller, viewstest.Grants(assignerModule, assignerModule+".seat-holders", tellerConsumer)...),
|
||||
"mesh.seat.mesh-catalog.call.revision", "mesh.seat.mesh-catalog.call.revision.>", "mesh.seat.mesh-catalog.call.registrations",
|
||||
"mesh.seat.mesh-catalog.call.registrations.>", "mesh.seat.mesh-delivery.call.source", "mesh.seat.mesh-delivery.call.source.>")
|
||||
// Who holds operator-channel, asked of the seat mesh-module-assigner's assignments (manifest invokes) before the router's
|
||||
// record of an open ask is read: a bed that refused the call held the teller's watch of the asks for the call's whole
|
||||
// timeout at each catch-up, and every ask written meanwhile waited (issue 1960, H1).
|
||||
teller = append(teller, "mesh.seat.mesh-module-assigner.call.assignments", "mesh.seat.mesh-module-assigner.call.assignments.>")
|
||||
teller = append(teller, keepsOf(bucketsOf(tellerModule).findings)...)
|
||||
view := append(append(readOf(tellerAnswers), readOf(assignerAsks)...), keepsOf(viewAnswers)...)
|
||||
assigner := keepsOf(assignerAsks)
|
||||
@@ -224,7 +228,9 @@ func (b *fullBed) place(t *testing.T) {
|
||||
}
|
||||
|
||||
// serveCatalogHalf answers the catalog half's three first views (design 47 G §614): the gate's one source branch, the
|
||||
// assigner registered on it, and its trunk revision whose entry of the assigner claims mesh-module-assigner.
|
||||
// assigner registered on it, and its trunk revision whose entry of the assigner claims mesh-module-assigner. It also answers
|
||||
// the seat mesh-module-assigner's assignments as the live seat does, naming ops-router the holder of operator-channel, so a
|
||||
// catch-up reads the router's record (ops-router_asks) at once.
|
||||
func serveCatalogHalf(t *testing.T, nc *nats.Conn) {
|
||||
t.Helper()
|
||||
respond := func(a any) nats.MsgHandler {
|
||||
@@ -235,8 +241,10 @@ func serveCatalogHalf(t *testing.T, nc *nats.Conn) {
|
||||
Entries: []meshcatalog.CatalogEntry{{Module: assignerModule, ManifestDigest: "d1", Manifest: map[string]any{"module": assignerModule,
|
||||
"claims": []any{map[string]any{"name": "mesh-module-assigner", "scope": "mesh"}}}}}}
|
||||
registrations := meshcatalog.RegistrationsAnswer{Registrations: []meshcatalog.Registration{{Module: assignerModule, Version: 1, Branches: []string{"release"}}}}
|
||||
assignments := json.RawMessage(`{"seats":[{"seat":"operator-channel","scope":"mesh","holders":[{"module":"ops-router","node":"n2"}]}]}`)
|
||||
for subject, handle := range map[string]nats.MsgHandler{"mesh.seat.mesh-catalog.call.revision": respond(revision),
|
||||
"mesh.seat.mesh-catalog.call.registrations": respond(registrations), "mesh.seat.mesh-delivery.call.source": respond(map[string]any{"branches": []string{"release"}})} {
|
||||
"mesh.seat.mesh-module-assigner.call.assignments": respond(assignments),
|
||||
"mesh.seat.mesh-catalog.call.registrations": respond(registrations), "mesh.seat.mesh-delivery.call.source": respond(map[string]any{"branches": []string{"release"}})} {
|
||||
for _, s := range []string{subject, subject + ".>"} {
|
||||
sub, err := nc.Subscribe(s, handle)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user