mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 11:48:43 -07:00
Fixed gateway test race report
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
@@ -2549,10 +2549,7 @@ func TestGatewayMsgSentOnlyOnce(t *testing.T) {
|
||||
if c == nil {
|
||||
t.Fatalf("S1 inbound gateway not found")
|
||||
}
|
||||
c.mu.Lock()
|
||||
in := c.inMsgs
|
||||
c.mu.Unlock()
|
||||
if in != 1 {
|
||||
if in := atomic.LoadInt64(&c.inMsgs); in != 1 {
|
||||
t.Fatalf("Expected s1's inbound gateway to have received a single message, got %v", in)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user