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:
Colin Sullivan
2016-10-27 09:51:15 -06:00
parent c3753d4d27
commit 6281894cc5
3 changed files with 13 additions and 2 deletions

View File

@@ -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)
}