diff --git a/src/dbnode/integration/graphite_find_test.go b/src/dbnode/integration/graphite_find_test.go index ee6b21bf44..a9a80512fa 100644 --- a/src/dbnode/integration/graphite_find_test.go +++ b/src/dbnode/integration/graphite_find_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration // Copyright (c) 2021 Uber Technologies, Inc. @@ -23,6 +24,7 @@ package integration import ( + "context" "encoding/json" "fmt" "math/rand" @@ -122,7 +124,7 @@ local: levels = 5 entriesPerLevelMin = 6 entriesPerLevelMax = 9 - randConstSeedSrc = rand.NewSource(123456789) + randConstSeedSrc = rand.NewSource(123456789) // nolint: gosec randGen = rand.New(randConstSeedSrc) rootNode = &graphiteNode{} buildNodes func(node *graphiteNode, level int) @@ -270,7 +272,8 @@ local: url := fmt.Sprintf("http://%s%s?%s", setup.QueryAddress(), graphitehandler.FindURL, params.Encode()) - req, err := http.NewRequest(http.MethodGet, url, nil) + req, err := http.NewRequestWithContext(context.Background(), + http.MethodGet, url, nil) require.NoError(t, err) res, err := httpClient.Do(req) diff --git a/src/dbnode/integration/setup.go b/src/dbnode/integration/setup.go index d1d10c6e45..18c63436b0 100644 --- a/src/dbnode/integration/setup.go +++ b/src/dbnode/integration/setup.go @@ -861,8 +861,8 @@ func (ts *testSetup) StartQuery(configYAML string) error { return fmt.Errorf("dbnode admin client not set") } - configFile, close := newTestFile(ts.t, "config.yaml", configYAML) - defer close() + configFile, cleanup := newTestFile(ts.t, "config.yaml", configYAML) + defer cleanup() var cfg queryconfig.Configuration err := xconfig.LoadFile(&cfg, configFile.Name(), xconfig.Options{}) diff --git a/src/query/server/query.go b/src/query/server/query.go index f4a36a9362..f4ed82eb7c 100644 --- a/src/query/server/query.go +++ b/src/query/server/query.go @@ -474,9 +474,10 @@ func Run(runOpts RunOptions) RunResult { case "", config.M3DBStorageType: // For m3db backend, we need to make connections to the m3db cluster // which generates a session and use the storage with the session. - m3dbClusters, clusterNamespacesWatcher, m3dbPoolWrapper, err = initClusters(cfg, - runOpts.DBConfig, runOpts.DBClient, encodingOpts, runOpts.LocalSessionReadyCh, - instrumentOptions, tsdbOpts.CustomAdminOptions()) + m3dbClusters, m3dbPoolWrapper, err = initClusters(cfg, runOpts.DBConfig, + clusterNamespacesWatcher, runOpts.DBClient, encodingOpts, + runOpts.LocalSessionReadyCh, instrumentOptions, + tsdbOpts.CustomAdminOptions()) if err != nil { logger.Fatal("unable to init clusters", zap.Error(err)) }