浏览代码

rm_test: fix goroutine leak

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
Gaurav Singh 5 年之前
父节点
当前提交
2a331a5ef7
共有 1 个文件被更改,包括 1 次插入1 次删除
  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)