From 291aeb8e0111fce3d9228dd0afd509418c0e9c14 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Wed, 25 Sep 2024 03:35:59 +0200 Subject: [PATCH] move stats reset Signed-off-by: Tim Vaillancourt --- go/vt/vttablet/tabletmanager/tm_init_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/go/vt/vttablet/tabletmanager/tm_init_test.go b/go/vt/vttablet/tabletmanager/tm_init_test.go index 2caecc162d0..b8c9c54dcc2 100644 --- a/go/vt/vttablet/tabletmanager/tm_init_test.go +++ b/go/vt/vttablet/tabletmanager/tm_init_test.go @@ -649,9 +649,6 @@ func TestGetBuildTags(t *testing.T) { } func TestStartExportStats(t *testing.T) { - statsTabletTags.ResetAll() - statsTabletTypeCount.ResetAll() - ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -687,6 +684,10 @@ func newTestMysqlDaemon(t *testing.T, port int32) *mysqlctl.FakeMysqlDaemon { } func newTestTM(t *testing.T, ts *topo.Server, uid int, keyspace, shard string, tags map[string]string) *TabletManager { + // reset stats + statsTabletTags.ResetAll() + statsTabletTypeCount.ResetAll() + t.Helper() ctx := context.Background() tablet := newTestTablet(t, uid, keyspace, shard, tags)