Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-09-22 12:44:36 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-10-06 08:47:00 +0300
commit21bbf22b3b2de22c6dcd873b20cb0c4f91750cf2 (patch)
tree2e8e5d45915c903f65b4d56eba8063417361673b
parentc7458405f369c07f77760aa72c69211c5f55bdf2 (diff)
catfile: Test for Goroutine leaks
A recent refactoring of the catfile cache has caused an incident via a new Goroutine leak. Assert that we do not leak any Goroutines via `MustHaveNoGoroutines()` now that the leak has been plugged such that we cannot have new regressions there.
-rw-r--r--internal/git/catfile/testhelper_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/git/catfile/testhelper_test.go b/internal/git/catfile/testhelper_test.go
index d78dc8092..4479adb85 100644
--- a/internal/git/catfile/testhelper_test.go
+++ b/internal/git/catfile/testhelper_test.go
@@ -17,7 +17,11 @@ func TestMain(m *testing.M) {
}
func testMain(m *testing.M) int {
- defer testhelper.MustHaveNoChildProcess()
+ defer func() {
+ testhelper.MustHaveNoChildProcess()
+ testhelper.MustHaveNoGoroutines()
+ }()
+
cleanup := testhelper.Configure()
defer cleanup()
return m.Run()