From 46a38929d9f8540fc88ffaa0b1052491ebf6591b Mon Sep 17 00:00:00 2001 From: Lev Brouk Date: Wed, 19 Jul 2023 04:24:09 -0700 Subject: [PATCH] Fixed tests --- server/events.go | 1 - server/events_test.go | 4 ++-- server/monitor_test.go | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/server/events.go b/server/events.go index 5d9f27e1..3f5bbab0 100644 --- a/server/events.go +++ b/server/events.go @@ -2686,7 +2686,6 @@ func (s *Server) nsubsRequest(sub *subscription, c *client, _ *Account, subject, s.sendInternalMsgLocked(reply, _EMPTY_, nil, nsubs) } -// accountClaimUpdate will receive claim updates for accounts. func (s *Server) reloadConfig(sub *subscription, c *client, _ *Account, subject, reply string, hdr, msg []byte) { if !s.eventsRunning() { return diff --git a/server/events_test.go b/server/events_test.go index e9ebe9e4..670de737 100644 --- a/server/events_test.go +++ b/server/events_test.go @@ -1666,7 +1666,7 @@ func TestSystemAccountWithGateways(t *testing.T) { // If this tests fails with wrong number after 10 seconds we may have // added a new inititial subscription for the eventing system. - checkExpectedSubs(t, 52, sa) + checkExpectedSubs(t, 53, sa) // Create a client on B and see if we receive the event urlb := fmt.Sprintf("nats://%s:%d", ob.Host, ob.Port) @@ -2620,7 +2620,7 @@ func TestServerEventsReload(t *testing.T) { require_True(t, apiResp.Data == nil) require_Error(t, apiResp.Error, fmt.Errorf("Parse error on line 1: 'Expected a top-level value to end with a new line, comment or EOF, but got 'n' instead.'")) - // See that the ping interval has changed. + // See that the ping interval has not changed. require_True(t, s.getOpts().PingInterval == 200*time.Millisecond) } diff --git a/server/monitor_test.go b/server/monitor_test.go index 512cce0c..3c036123 100644 --- a/server/monitor_test.go +++ b/server/monitor_test.go @@ -3945,7 +3945,7 @@ func TestMonitorAccountz(t *testing.T) { body = string(readBody(t, fmt.Sprintf("http://127.0.0.1:%d%s?acc=$SYS", s.MonitorAddr().Port, AccountzPath))) require_Contains(t, body, `"account_detail": {`) require_Contains(t, body, `"account_name": "$SYS",`) - require_Contains(t, body, `"subscriptions": 46,`) + require_Contains(t, body, `"subscriptions": 47,`) require_Contains(t, body, `"is_system": true,`) require_Contains(t, body, `"system_account": "$SYS"`)