diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2020-09-01 15:05:57 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2020-09-01 15:25:25 +0300 |
commit | f18764f0850079e08ae4a97b90d59440fbc2f8c4 (patch) | |
tree | fe4d589f9dc7141adc57568066a77422d4989cd7 /internal/praefect | |
parent | 851da3925944b969da7f87057ba8da8274d5c18d (diff) |
increase health check wait time in flaky test
TestErrorThreshold can flake if the node health is not checked
before the test performs an assertation that the node is marked
unhealthy. This commit decreases the chance of the flaky condition
by making the health checks more frequent and waiting longer for
them to run.
Diffstat (limited to 'internal/praefect')
-rw-r--r-- | internal/praefect/server_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/praefect/server_test.go b/internal/praefect/server_test.go index 8c16a23b2..7cc8455c5 100644 --- a/internal/praefect/server_test.go +++ b/internal/praefect/server_test.go @@ -990,7 +990,7 @@ func TestErrorThreshold(t *testing.T) { require.NoError(t, err) cli := mock.NewSimpleServiceClient(conn) - nodeMgr.Start(0, 5*time.Millisecond) + nodeMgr.Start(0, time.Nanosecond) repo, _, cleanup := testhelper.NewTestRepo(t) defer cleanup() @@ -1012,7 +1012,7 @@ func TestErrorThreshold(t *testing.T) { require.Equal(t, expectedErr, err) } - time.Sleep(5 * time.Millisecond) + time.Sleep(10 * time.Millisecond) _, err = nodeMgr.GetShard("default") require.Equal(t, nodes.ErrPrimaryNotHealthy, err) |