mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
fix preference test races (#7645)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user