Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
use testutil.UntilPass
Browse files Browse the repository at this point in the history
  • Loading branch information
miparnisari committed Feb 28, 2024
1 parent 6a53c43 commit e4d42b7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1618,8 +1618,13 @@ func TestHealthCheck(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), clock.Second*15)
defer cancel()
require.NoError(t, cluster.Restart(ctx))
// wait for instances to come online
time.Sleep(1 * time.Second)

// wait for instances to come back online
testutil.UntilPass(t, 10, clock.Millisecond*300, func(t testutil.TestingT) {
healthResp, err = client.HealthCheck(context.Background(), &guber.HealthCheckReq{})
assert.Nil(t, err)
assert.Equal(t, "healthy", healthResp.GetStatus())
})
}

func TestLeakyBucketDivBug(t *testing.T) {
Expand Down

0 comments on commit e4d42b7

Please sign in to comment.