From fc54aececcded9e84f0565d3672c43cc50b1d994 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Thu, 29 Sep 2016 12:57:37 -0400 Subject: Added a short wait to TestSetActiveChannel to stop randomly failing tests (#4115) * Added a short wait to TestSetActiveChannel to stop randomly failing tests * Increased the timeout in TestWebSocketEvent --- api/status_test.go | 2 ++ api/websocket_test.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'api') diff --git a/api/status_test.go b/api/status_test.go index 6e4fb30ca..f15c239db 100644 --- a/api/status_test.go +++ b/api/status_test.go @@ -182,6 +182,8 @@ func TestSetActiveChannel(t *testing.T) { t.Fatal(err) } + time.Sleep(500 * time.Millisecond) + status, _ = GetStatus(th.BasicUser.Id) // need to check if offline to catch race if status.Status != model.STATUS_OFFLINE && status.ActiveChannel != th.BasicChannel.Id { diff --git a/api/websocket_test.go b/api/websocket_test.go index be762429a..dcbc8e0f4 100644 --- a/api/websocket_test.go +++ b/api/websocket_test.go @@ -101,7 +101,7 @@ func TestWebSocketEvent(t *testing.T) { } }() - time.Sleep(300 * time.Millisecond) + time.Sleep(400 * time.Millisecond) stop <- true @@ -128,7 +128,7 @@ func TestWebSocketEvent(t *testing.T) { } }() - time.Sleep(300 * time.Millisecond) + time.Sleep(400 * time.Millisecond) stop <- true -- cgit v1.2.3-1-g7c22