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
This commit is contained in:
Harrison Healey
2016-09-29 12:57:37 -04:00
committed by Joram Wilander
parent 53ba8ec9c2
commit fc54aececc
2 changed files with 4 additions and 2 deletions

View File

@@ -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 {

View File

@@ -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