Explorar o código

rm_test: fix goroutine leak

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
Gaurav Singh %!s(int64=5) %!d(string=hai) anos
pai
achega
2a331a5ef7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      pkg/system/rm_test.go

+ 1 - 1
pkg/system/rm_test.go

@@ -63,7 +63,7 @@ func TestEnsureRemoveAllWithMount(t *testing.T) {
 		t.Fatal(err)
 	}
 
-	done := make(chan struct{})
+	done := make(chan struct{}, 1)
 	go func() {
 		err = EnsureRemoveAll(dir1)
 		close(done)