@@ -1799,7 +1799,7 @@ func TestMsgTraceServiceImport(t *testing.T) {
1799
1799
}
1800
1800
}
1801
1801
// Check that no (more) messages are received.
1802
- if msg , err := sub .NextMsg (100 * time .Millisecond ); msg != nil || err != nats .ErrTimeout {
1802
+ if msg , err := sub .NextMsg (100 * time .Millisecond ); msg != nil || ( err != nats .ErrTimeout && err != nats . ErrNoResponders ) {
1803
1803
t .Fatalf ("Did not expect application message, got msg=%v err=%v" , msg , err )
1804
1804
}
1805
1805
if ! test .deliverMsg {
@@ -2072,7 +2072,7 @@ func TestMsgTraceServiceImportWithSuperCluster(t *testing.T) {
2072
2072
}
2073
2073
}
2074
2074
// Check that no (more) messages are received.
2075
- if msg , err := sub .NextMsg (100 * time .Millisecond ); msg != nil || err != nats .ErrTimeout {
2075
+ if msg , err := sub .NextMsg (100 * time .Millisecond ); msg != nil || ( err != nats .ErrTimeout && err != nats . ErrNoResponders ) {
2076
2076
t .Fatalf ("Did not expect application message, got msg=%v err=%v" , msg , err )
2077
2077
}
2078
2078
if ! test .deliverMsg {
@@ -2523,7 +2523,7 @@ func TestMsgTraceServiceImportWithLeafNodeLeaf(t *testing.T) {
2523
2523
require_Equal [string ](t , string (appMsg .Data ), "request2" )
2524
2524
}
2525
2525
// Check that no (more) messages are received.
2526
- if msg , err := sub .NextMsg (100 * time .Millisecond ); msg != nil || err != nats .ErrTimeout {
2526
+ if msg , err := sub .NextMsg (100 * time .Millisecond ); msg != nil || ( err != nats .ErrTimeout && err != nats . ErrNoResponders ) {
2527
2527
t .Fatalf ("Did not expect application message, got msg=%v err=%v" , msg , err )
2528
2528
}
2529
2529
if ! test .deliverMsg {
0 commit comments