From 052077341259eec803d128c8a70edef2dc0aca6c Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 18 Oct 2026 19:27:12 +0200 Subject: [PATCH] The connections request asks for user names, which the server leaves out otherwise (issue 1147) --- internal/broker/system_exports_live_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/broker/system_exports_live_test.go b/internal/broker/system_exports_live_test.go index 48613678..2b53441e 100644 --- a/internal/broker/system_exports_live_test.go +++ b/internal/broker/system_exports_live_test.go @@ -116,8 +116,10 @@ func TestNatsTheSystemAccountsExportsReachMeshOnAReload(t *testing.T) { // 1147/ } } hears(connects, "connect") - // The answer to the connections request lists the open connections, the shop's among them. - reply, err := watchman.Request(BusConnzSubject, []byte(`{}`), 5*time.Second) + // The answer to the connections request lists the open connections, the shop's among them. The server names the + // account from the subject the export clamps (MESH), but leaves the user's name out unless the request asks for it + // with "auth": true (monitor.go ConnzOptions.Username), so the watchman asks so. + reply, err := watchman.Request(BusConnzSubject, []byte(`{"auth":true}`), 5*time.Second) if err != nil { t.Fatalf("mesh.bus.connz is not answered: %v", err) }