diff options
author | Chris <ccbrown112@gmail.com> | 2017-10-18 09:21:28 -0700 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-10-18 12:21:28 -0400 |
commit | 3c0ccaafe79375d18e2b7359bb8f6eaee4eb34df (patch) | |
tree | b038c0ef0ff50c813927b43e2b2b4c981d49678b /api4/preference_test.go | |
parent | 7b1fb3c2c77a435a86a1886b279ace7c981a8cff (diff) | |
download | chat-3c0ccaafe79375d18e2b7359bb8f6eaee4eb34df.tar.gz chat-3c0ccaafe79375d18e2b7359bb8f6eaee4eb34df.tar.bz2 chat-3c0ccaafe79375d18e2b7359bb8f6eaee4eb34df.zip |
fix preference test races (#7645)
Diffstat (limited to 'api4/preference_test.go')
-rw-r--r-- | api4/preference_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/api4/preference_test.go b/api4/preference_test.go index 4a68bc804..68d34784f 100644 --- a/api4/preference_test.go +++ b/api4/preference_test.go @@ -252,6 +252,10 @@ func TestUpdatePreferencesWebsocket(t *testing.T) { } WebSocketClient.Listen() + time.Sleep(300 * time.Millisecond) + if resp := <-WebSocketClient.ResponseChannel; resp.Status != model.STATUS_OK { + t.Fatal("should have responded OK to authentication challenge") + } userId := th.BasicUser.Id preferences := &model.Preferences{ @@ -371,6 +375,10 @@ func TestDeletePreferencesWebsocket(t *testing.T) { } WebSocketClient.Listen() + time.Sleep(300 * time.Millisecond) + if resp := <-WebSocketClient.ResponseChannel; resp.Status != model.STATUS_OK { + t.Fatal("should have responded OK to authentication challenge") + } _, resp = th.Client.DeletePreferences(userId, preferences) CheckNoError(t, resp) |