Skip to content

Commit

Permalink
test: fix TestHashKVWhenCompacting: ensure all goroutine finished
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Wang <[email protected]>
  • Loading branch information
ahrtr committed Jan 25, 2024
1 parent a0ff8e4 commit 1921cad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/mvcc/kvstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -610,10 +610,11 @@ func TestHashKVWhenCompacting(t *testing.T) {

select {
case <-donec:
wg.Wait()
case <-time.After(10 * time.Second):
testutil.FatalStack(t, "timeout")
}

wg.Wait()
}

// TestHashKVWithCompactedAndFutureRevisions ensures that HashKV returns a correct hash when called
Expand Down

0 comments on commit 1921cad

Please sign in to comment.