From c11ebddbfb6682deb4114478d3e2ff29f8641c06 Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Tue, 7 Aug 2018 19:52:51 +0200 Subject: try to fix the flaky test (#9231) --- app/web_hub_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/web_hub_test.go b/app/web_hub_test.go index 62c2552de..8702acb21 100644 --- a/app/web_hub_test.go +++ b/app/web_hub_test.go @@ -53,8 +53,10 @@ func TestHubStopWithMultipleConnections(t *testing.T) { defer s.Close() th.App.HubStart() - registerDummyWebConn(t, th.App, s.Listener.Addr(), th.BasicUser.Id) - registerDummyWebConn(t, th.App, s.Listener.Addr(), th.BasicUser.Id) - registerDummyWebConn(t, th.App, s.Listener.Addr(), th.BasicUser.Id) - th.App.HubStop() + wc1 := registerDummyWebConn(t, th.App, s.Listener.Addr(), th.BasicUser.Id) + wc2 := registerDummyWebConn(t, th.App, s.Listener.Addr(), th.BasicUser.Id) + wc3 := registerDummyWebConn(t, th.App, s.Listener.Addr(), th.BasicUser.Id) + defer wc1.Close() + defer wc2.Close() + defer wc3.Close() } -- cgit v1.2.3-1-g7c22