From 467141ab69c7c6038897bf87c54cd92cf2671864 Mon Sep 17 00:00:00 2001 From: Michael Kochell Date: Sun, 13 Oct 2019 12:37:34 -0600 Subject: [PATCH] [MM-19004] Change assertion in client4/system_test.go to be less flaky (#12586) * avoid swallowing errors from websocket_client.SendMessage * Revert "avoid swallowing errors from websocket_client.SendMessage" This reverts commit 5f223e0996f59f31792607c8a4fbf63bf42040ee. * test against app.TotalWebsocketConnections instead of hardcoding assertion --- api4/system_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api4/system_test.go b/api4/system_test.go index 6e58b56413..25d5cdc174 100644 --- a/api4/system_test.go +++ b/api4/system_test.go @@ -383,7 +383,7 @@ func TestGetAnalyticsOld(t *testing.T) { rows2, resp2 = th.SystemAdminClient.GetAnalyticsOld("standard", "") CheckNoError(t, resp2) assert.Equal(t, "total_websocket_connections", rows2[5].Name) - assert.Equal(t, float64(1), rows2[5].Value) + assert.Equal(t, float64(th.App.TotalWebsocketConnections()), rows2[5].Value) WebSocketClient.Close()