From ac95e5628cf0b38de5ef54083e703f3cc38b5bfb Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 20 Nov 2026 16:11:14 +0100 Subject: [PATCH] mesh-grants: the test's stand-in nats_streams skips a consumer gone between its listing and its read MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Under load (8 copies side by side) TestTheGrantsPartWhole panicked at integration_test.go:151 at abb7cfcf too: st.Consumer's error was dropped and a consumer deleted after ConsumerNames listed it gave a nil one. Builds: design 47 H ยง746 (the pipeline's integration step) --- modules/mesh-grants/cmd/mesh-grants/integration_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/mesh-grants/cmd/mesh-grants/integration_test.go b/modules/mesh-grants/cmd/mesh-grants/integration_test.go index a7d41915..b64f7cdf 100644 --- a/modules/mesh-grants/cmd/mesh-grants/integration_test.go +++ b/modules/mesh-grants/cmd/mesh-grants/integration_test.go @@ -147,7 +147,10 @@ func TestTheGrantsPartWhole(t *testing.T) { consumers := []any{} names := st.ConsumerNames(ctx) for name := range names.Name() { - c, _ := st.Consumer(ctx, name) + c, err := st.Consumer(ctx, name) + if err != nil { + continue // deleted between the listing and its read: the bus module's tool lists what it can read + } cfg := c.CachedInfo().Config consumers = append(consumers, map[string]any{"name": name, "filters": cfg.FilterSubjects, "max_deliver": cfg.MaxDeliver}) }