Skip to content

Commit

Permalink
nsqadmin tests: each nsqlookupd needs its own options struct
Browse files Browse the repository at this point in the history
to avoid data races setting opts.logLevel
  • Loading branch information
ploxiln committed May 26, 2017
1 parent 4203909 commit 259547b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions nsqadmin/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,12 @@ func TestHTTPconfig(t *testing.T) {

lopts := nsqlookupd.NewOptions()
lopts.Logger = test.NewTestLogger(t)
_, _, lookupd1 := mustStartNSQLookupd(lopts)

lopts1 := *lopts
_, _, lookupd1 := mustStartNSQLookupd(&lopts1)
defer lookupd1.Exit()
_, _, lookupd2 := mustStartNSQLookupd(lopts)
lopts2 := *lopts
_, _, lookupd2 := mustStartNSQLookupd(&lopts2)
defer lookupd2.Exit()

url := fmt.Sprintf("http://%s/config/nsqlookupd_http_addresses", nsqadmin1.RealHTTPAddr())
Expand Down

0 comments on commit 259547b

Please sign in to comment.