Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
robskillington committed May 31, 2022
1 parent d07d544 commit b5bb88d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
7 changes: 5 additions & 2 deletions src/dbnode/integration/graphite_find_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration
// +build integration

// Copyright (c) 2021 Uber Technologies, Inc.
Expand All @@ -23,6 +24,7 @@
package integration

import (
"context"
"encoding/json"
"fmt"
"math/rand"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/dbnode/integration/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{})
Expand Down
7 changes: 4 additions & 3 deletions src/query/server/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit b5bb88d

Please sign in to comment.