mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Updates based on code review
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
@@ -816,7 +816,7 @@ func TestSystemAccountSystemConnectionLimitsHonored(t *testing.T) {
|
||||
|
||||
// The account's connection count is exchanged between servers
|
||||
// so that the local count on each server reflects the total count.
|
||||
// Pause a bit to give a change for each server to process the update.
|
||||
// Pause a bit to give a chance to each server to process the update.
|
||||
time.Sleep(15 * time.Millisecond)
|
||||
}
|
||||
if tc != 10 {
|
||||
|
||||
@@ -707,14 +707,15 @@ func TestLameDuckMode(t *testing.T) {
|
||||
if n := len(cz.Conns); n != total {
|
||||
return fmt.Errorf("expected %v closed connections, got %v", total, n)
|
||||
}
|
||||
for _, c := range cz.Conns {
|
||||
if !strings.Contains(c.Reason, ServerShutdown.String()) {
|
||||
return fmt.Errorf("expected closed connection with `%s` state, got `%s`",
|
||||
ServerShutdown.String(), c.Reason)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
})
|
||||
cz := pollConz(t, srvA, 1, "", &ConnzOptions{State: ConnClosed})
|
||||
if n := len(cz.Conns); n != total {
|
||||
t.Fatalf("Expected %v closed connections, got %v", total, n)
|
||||
}
|
||||
for _, c := range cz.Conns {
|
||||
checkReason(t, c.Reason, ServerShutdown)
|
||||
}
|
||||
|
||||
stopClientsAndSrvB(ncs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user