Merge pull request #13549 from songlh-psu/main

fixing the goroutine leaks in TestHashKVWhenCompacting
This commit is contained in:
Piotr Tabor
2022-01-14 13:58:16 +01:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -536,6 +536,8 @@ type hashKVResult struct {
func TestHashKVWhenCompacting(t *testing.T) {
b, tmpPath := betesting.NewDefaultTmpBackend(t)
s := NewStore(zap.NewExample(), b, &lease.FakeLessor{}, StoreConfig{})
defer s.Close()
defer b.Close()
defer os.Remove(tmpPath)
rev := 10000

View File

@@ -616,7 +616,8 @@ func TestStressWatchCancelClose(t *testing.T) {
s := newWatchableStore(zap.NewExample(), b, &lease.FakeLessor{}, StoreConfig{})
defer func() {
s.store.Close()
b.Close()
s.Close()
os.Remove(tmpPath)
}()