Skip to content

Commit 5b50428

Browse files
authored
Add Go Leak Check for Badgerstore, gRPC and Memstore e2e Tests (#6347)
## Which problem is this PR solving? Fixes a part of #5006 ## Description of the changes - Added go leak check for badgerstore, grpc and Memstore ## How was this change tested? - Integration Tests ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` Signed-off-by: Manik2708 <[email protected]>
1 parent d69dad5 commit 5b50428

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

plugin/storage/integration/badgerstore_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"go.uber.org/zap/zaptest"
1313

1414
"github.com/jaegertracing/jaeger/pkg/metrics"
15+
"github.com/jaegertracing/jaeger/pkg/testutils"
1516
"github.com/jaegertracing/jaeger/plugin/storage/badger"
1617
)
1718

@@ -47,6 +48,9 @@ func (s *BadgerIntegrationStorage) cleanUp(t *testing.T) {
4748

4849
func TestBadgerStorage(t *testing.T) {
4950
SkipUnlessEnv(t, "badger")
51+
t.Cleanup(func() {
52+
testutils.VerifyGoLeaksOnce(t)
53+
})
5054
s := &BadgerIntegrationStorage{
5155
StorageIntegration: StorageIntegration{
5256
SkipArchiveTest: true,

plugin/storage/integration/grpc_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313

1414
"github.com/jaegertracing/jaeger/pkg/config"
1515
"github.com/jaegertracing/jaeger/pkg/metrics"
16+
"github.com/jaegertracing/jaeger/pkg/testutils"
1617
"github.com/jaegertracing/jaeger/plugin/storage/grpc"
1718
)
1819

@@ -61,6 +62,9 @@ func (s *GRPCStorageIntegrationTestSuite) cleanUp(t *testing.T) {
6162

6263
func TestGRPCRemoteStorage(t *testing.T) {
6364
SkipUnlessEnv(t, "grpc")
65+
t.Cleanup(func() {
66+
testutils.VerifyGoLeaksOnce(t)
67+
})
6468
s := &GRPCStorageIntegrationTestSuite{
6569
flags: []string{
6670
"--grpc-storage.server=localhost:17271",

plugin/storage/integration/memstore_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ func (s *MemStorageIntegrationTestSuite) initialize(_ *testing.T) {
3636

3737
func TestMemoryStorage(t *testing.T) {
3838
SkipUnlessEnv(t, "memory")
39+
t.Cleanup(func() {
40+
testutils.VerifyGoLeaksOnce(t)
41+
})
3942
s := &MemStorageIntegrationTestSuite{}
4043
s.initialize(t)
4144
s.RunAll(t)

0 commit comments

Comments
 (0)