diff --git a/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/integration_test.go b/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/integration_test.go index 059a5628c..1b0460691 100644 --- a/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/integration_test.go +++ b/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/integration_test.go @@ -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 {