Skip to content

Commit

Permalink
Modified a test to get more info on the failure (if it fails again)
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlovic committed Nov 9, 2015
1 parent b9ec52f commit d4d7443
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/conn_test.go
Expand Up @@ -89,7 +89,12 @@ func TestServerStopDisconnectedCB(t *testing.T) {
}
s.Shutdown()
if e := Wait(ch); e != nil {
t.Fatalf("Disconnected callback not triggered\n")
endpoint := fmt.Sprintf("localhost:%d", nats.DefaultPort)
if testConn, err := net.DialTimeout("tcp", endpoint, o.Timeout); err == nil {
testConn.Close()
t.Fatal("The server is still running, that's why we get a failure here!")
}
t.Fatal("Disconnected callback not triggered\n")
}
nc.Close()
}
Expand Down

0 comments on commit d4d7443

Please sign in to comment.