chore: stabilize one more health test

Same approach: attempt more retries to fight general slowness/resource
starvation.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
This commit is contained in:
Andrey Smirnov 2019-08-06 01:00:34 +03:00 committed by Andrey Smirnov
parent 719afb56bd
commit 80f2d62958

View File

@ -100,7 +100,12 @@ func (suite *CheckSuite) TestHealthChange() {
atomic.StoreUint32(&healthy, 1)
time.Sleep(50 * time.Millisecond)
for i := 0; i < 10; i++ {
time.Sleep(20 * time.Millisecond)
if *state.Get().Healthy {
break
}
}
suite.Require().True(*state.Get().Healthy)
suite.Require().Equal("", state.Get().LastMessage)