fix preference test races (#7645)

This commit is contained in:
Chris
2017-10-18 12:21:28 -04:00
committed by Joram Wilander
parent 7b1fb3c2c7
commit 3c0ccaafe7
+8
View File
@@ -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)