Skip to content

Commit c0d37a5

Browse files
committed
metamorphic: use leaktest in metamorphic test
Use the leaktest in the metamorphic unit tests to catch any leaked goroutines. Inform cockroachdb/cockroach#148649.
1 parent 4ad0e5f commit c0d37a5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/metamorphic/meta_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"path/filepath"
1010
"testing"
1111

12+
"github.com/cockroachdb/crlib/testutils/leaktest"
1213
"github.com/cockroachdb/pebble/internal/metamorphic/metaflags"
1314
"github.com/cockroachdb/pebble/metamorphic"
1415
)
@@ -52,14 +53,17 @@ var runOnceFlags, runFlags = metaflags.InitAllFlags()
5253
// be customized via the --inner-binary flag (used for code coverage
5354
// instrumentation).
5455
func TestMeta(t *testing.T) {
56+
defer leaktest.AfterTest(t)()
5557
runTestMeta(t)
5658
}
5759

5860
func TestMetaTwoInstance(t *testing.T) {
61+
defer leaktest.AfterTest(t)()
5962
runTestMeta(t, metamorphic.MultiInstance(2))
6063
}
6164

6265
func TestMetaCockroachKVs(t *testing.T) {
66+
defer leaktest.AfterTest(t)()
6367
runTestMeta(t, metamorphic.CockroachKeyFormat)
6468
}
6569

0 commit comments

Comments
 (0)