mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 03:24:40 -07:00
Add staticcheck static analyzer to travis.
Included are small fixes to address warnings found in test code. No functional changes.
This commit is contained in:
@@ -83,10 +83,11 @@ func TestServerRestartReSliceIssue(t *testing.T) {
|
||||
defer srvB.Shutdown()
|
||||
|
||||
// Check that all expected clients have reconnected
|
||||
for i := 0; i < numClients/2; i++ {
|
||||
done := false
|
||||
for i := 0; i < numClients/2 && !done; i++ {
|
||||
select {
|
||||
case <-reconnectsDone:
|
||||
break
|
||||
done = true
|
||||
case <-time.After(3 * time.Second):
|
||||
t.Fatalf("Expected %d reconnects, got %d\n", numClients/2, reconnects)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user