Skip to content

Commit 18d9129

Browse files
derekcollisonneilalexander
authored andcommitted
Fix tests that were looking for timeout errors vs no responders
Signed-off-by: Derek Collison <[email protected]>
1 parent ec536ae commit 18d9129

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

server/jetstream_cluster_2_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7051,7 +7051,7 @@ func TestJetStreamClusterStreamDirectGetNotTooSoon(t *testing.T) {
70517051
defer nc.Close()
70527052

70537053
_, err = nc.Request(getSubj, nil, time.Second)
7054-
require_Error(t, err, nats.ErrTimeout)
7054+
require_Error(t, err, nats.ErrNoResponders)
70557055

70567056
// Now start all and make sure they all eventually have subs for direct access.
70577057
c.restartAll()

server/jwt_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6189,8 +6189,7 @@ func TestJWTAccountProtectedImport(t *testing.T) {
61896189

61906190
// ensure service fails
61916191
_, err = ncImp.Request(srvcSub, []byte("hello"), time.Second)
6192-
require_Error(t, err)
6193-
require_Contains(t, err.Error(), "timeout")
6192+
require_Error(t, err, nats.ErrNoResponders)
61946193
s.AccountResolver().Store(exportPub, exportJWTOn)
61956194
// ensure stream fails
61966195
err = ncExp.Publish(strmSub, []byte("hello"))

0 commit comments

Comments
 (0)