浏览代码

testutil: check for grpc resources in AfterTest

gRPC leaks only show up at the final leak check, making it difficult to
determine which test is causing the leak.
Anthony Romano 9 年之前
父节点
当前提交
997e83f8ea
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      pkg/testutil/leak.go

+ 1 - 0
pkg/testutil/leak.go

@@ -76,6 +76,7 @@ func CheckAfterTest(d time.Duration) error {
 		"net.(*netFD).connect(":                        "a timing out dial",
 		").noteClientGone(":                            "a closenotifier sender",
 		").readLoop(":                                  "a Transport",
+		".grpc":                                        "a gRPC resource",
 	}
 
 	var stacks string