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 <benjamin.ahrtr@gmail.com>
  • Loading branch information
ahrtr committed Jan 25, 2024
1 parent 0bfbc4f commit f3071ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/storage/mvcc/kvstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -620,10 +620,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 f3071ed

Please sign in to comment.