Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSami Hiltunen <shiltunen@gitlab.com>2020-09-01 15:05:57 +0300
committerSami Hiltunen <shiltunen@gitlab.com>2020-09-01 15:25:25 +0300
commitf18764f0850079e08ae4a97b90d59440fbc2f8c4 (patch)
treefe4d589f9dc7141adc57568066a77422d4989cd7 /internal/praefect
parent851da3925944b969da7f87057ba8da8274d5c18d (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.go4
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)