Skip to content

Commit

Permalink
tests/e2e: use WaitLeader in corrupt test
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Valdes <[email protected]>
  • Loading branch information
ivanvc committed Feb 8, 2024
1 parent 8b24932 commit 07c4dcb
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 07c4dcb

Please sign in to comment.