Skip to content

Commit 45adf9c

Browse files
committed
test(NODE-6858): handle MongoServerSelectionError
1 parent 8535a7c commit 45adf9c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/error.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,9 +1551,9 @@ export function isResumableError(error?: Error, wireVersion?: number): boolean {
15511551
return true;
15521552
}
15531553

1554-
// if (error instanceof MongoServerSelectionError) {
1555-
// return true;
1556-
// }
1554+
if (error instanceof MongoServerSelectionError) {
1555+
return true;
1556+
}
15571557

15581558
if (wireVersion != null && wireVersion >= 9) {
15591559
// DRIVERS-1308: For 4.4 drivers running against 4.4 servers, drivers will add a special case to treat the CursorNotFound error code as resumable

test/integration/change-streams/change_stream.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2003,7 +2003,7 @@ describe('Change Streams', function () {
20032003
});
20042004
});
20052005

2006-
describe.only('ChangeStream resumability', function () {
2006+
describe('ChangeStream resumability', function () {
20072007
let client: MongoClient;
20082008
let collection: Collection;
20092009
let changeStream: ChangeStream;

0 commit comments

Comments
 (0)