Skip to content

Commit

Permalink
Merge pull request etcd-io#10993 from yuzeming/patch-1
Browse files Browse the repository at this point in the history
integration: fix a data race about `err`
  • Loading branch information
jingyih authored Aug 6, 2019
2 parents 88f4b83 + 1814192 commit 0d85aa1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions clientv3/integration/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ func TestV3ClientMetrics(t *testing.T) {
var (
addr = "localhost:27989"
ln net.Listener
err error
)

// listen for all Prometheus metrics
donec := make(chan struct{})
go func() {
var err error

defer close(donec)

srv := &http.Server{Handler: promhttp.Handler()}
Expand Down Expand Up @@ -87,7 +88,7 @@ func TestV3ClientMetrics(t *testing.T) {

pBefore := sumCountersForMetricAndLabels(t, url, "grpc_client_started_total", "Put", "unary")

_, err = cli.Put(context.Background(), "foo", "bar")
_, err := cli.Put(context.Background(), "foo", "bar")
if err != nil {
t.Errorf("Error putting value in key store")
}
Expand Down

0 comments on commit 0d85aa1

Please sign in to comment.