Skip to content

Commit 00e6392

Browse files
Fix flaky memberlist TestRejoin test (#598)
It randomly failed here: #525 and in some of the test runs here: #596 This test fails due to the probe interval being 5s, which is the same time we poll for
1 parent 53283a0 commit 00e6392

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/find-flaky-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jobs:
88
find-flaky-tests:
99
# Only run this workflow when the comment contains '/find-flaky-tests' or it's manually triggered
1010
if: contains(github.event.comment.body, '/find-flaky-tests') || github.event_name == 'workflow_dispatch'
11+
fail-fast: false
1112
strategy:
1213
matrix:
1314
runs: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] # Run the build workflow 20 times

kv/memberlist/memberlist_client_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,20 +1240,20 @@ func TestRejoin(t *testing.T) {
12401240
return mkv2.memberlist.NumMembers()
12411241
}
12421242

1243-
poll(t, 5*time.Second, 2, membersFunc)
1243+
poll(t, 7*time.Second, 2, membersFunc) // Probe interval is 5s, with 2s timeout, so probe for 7s.
12441244

12451245
// Shutdown first KV
12461246
require.NoError(t, services.StopAndAwaitTerminated(context.Background(), mkv1))
12471247

12481248
// Second KV should see single member now.
1249-
poll(t, 5*time.Second, 1, membersFunc)
1249+
poll(t, 7*time.Second, 1, membersFunc)
12501250

12511251
// Let's start first KV again. It is not configured to join the cluster, but KV2 is rejoining.
12521252
mkv1 = NewKV(cfg1, log.NewNopLogger(), &dnsProviderMock{}, prometheus.NewPedanticRegistry())
12531253
require.NoError(t, services.StartAndAwaitRunning(context.Background(), mkv1))
12541254
defer services.StopAndAwaitTerminated(context.Background(), mkv1) //nolint:errcheck
12551255

1256-
poll(t, 5*time.Second, 2, membersFunc)
1256+
poll(t, 7*time.Second, 2, membersFunc)
12571257
}
12581258

12591259
func TestMessageBuffer(t *testing.T) {

0 commit comments

Comments
 (0)