From d084853affe2d3188f5ff91a5cab6dcf3ef4fe2d Mon Sep 17 00:00:00 2001 From: Derek Collison Date: Tue, 2 Mar 2021 18:31:42 -0800 Subject: [PATCH] Actually need to wait to accumulate, make sure we get at least 8. Signed-off-by: Derek Collison --- server/jetstream_cluster_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/jetstream_cluster_test.go b/server/jetstream_cluster_test.go index 50374ef7..e03c64f5 100644 --- a/server/jetstream_cluster_test.go +++ b/server/jetstream_cluster_test.go @@ -2887,12 +2887,15 @@ func TestJetStreamClusterExtendedAccountInfo(t *testing.T) { return info.JetStreamAccountStats } + // Wait to accumulate. + time.Sleep(250 * time.Millisecond) + ai := getAccountInfo() if ai.Streams != 3 || ai.Consumers != 3 { t.Fatalf("AccountInfo not correct: %+v", ai) } - if ai.API.Total < 9 { - t.Fatalf("Expected at least 9 total API calls, got %d", ai.API.Total) + if ai.API.Total < 8 { + t.Fatalf("Expected at least 8 total API calls, got %d", ai.API.Total) } // Now do a failure to make sure we track API errors.