Skip to content

Commit

Permalink
Merge pull request etcd-io#17396 from ivanvc/3.5-use-wait-leader-in-c…
Browse files Browse the repository at this point in the history
…orrupt-test

[3.5] tests/e2e: use WaitLeader in corrupt test
  • Loading branch information
ahrtr authored Feb 9, 2024
2 parents b2aa3a1 + 07c4dcb commit ae7d493
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/e2e/corrupt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,10 @@ func TestCompactHashCheckDetectCorruptionInterrupt(t *testing.T) {
_, err = epc.Procs[slowCompactionNodeIndex].Logs().Expect("finished scheduled compaction")
require.NoError(t, err, "can't get log indicating finished scheduled compaction")

// Wait for compaction hash check
time.Sleep(checkTime * 5)
// Wait until the leader finished compaction hash check.
leaderIndex := epc.WaitLeader(t)
_, err = epc.Procs[leaderIndex].Logs().Expect("finished compaction hash check")
require.NoError(t, err, "can't get log indicating finished compaction hash check")

alarmResponse, err := cc.AlarmList()
require.NoError(t, err, "error on alarm list")
Expand Down

0 comments on commit ae7d493

Please sign in to comment.