diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-09-29 12:57:37 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-09-29 12:57:37 -0400 |
commit | fc54aececcded9e84f0565d3672c43cc50b1d994 (patch) | |
tree | de43709b81971657aa36067ce2ccf74c95e37915 /api | |
parent | 53ba8ec9c2bbaee510c2b1c9b5b59f9fdf44f365 (diff) | |
download | chat-fc54aececcded9e84f0565d3672c43cc50b1d994.tar.gz chat-fc54aececcded9e84f0565d3672c43cc50b1d994.tar.bz2 chat-fc54aececcded9e84f0565d3672c43cc50b1d994.zip |
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
Diffstat (limited to 'api')
-rw-r--r-- | api/status_test.go | 2 | ||||
-rw-r--r-- | api/websocket_test.go | 4 |
2 files changed, 4 insertions, 2 deletions
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 |