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
Этот коммит содержится в:
Harrison Healey
2016-09-29 12:57:37 -04:00
коммит произвёл Joram Wilander
родитель 53ba8ec9c2
Коммит fc54aececc
2 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

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

Просмотреть файл

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