Skip to content

Commit 0463f78

Browse files
committed
test: force close clients in some tests where cursors are left open
This is a stopgap for getting these tests to pass, since closing the cursor was still flakey
1 parent d6e8936 commit 0463f78

4 files changed

+9
-4
lines changed

test/functional/cursor_tests.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -3836,7 +3836,9 @@ describe('Cursor', function() {
38363836
}, 300);
38373837
} else {
38383838
test.ok(new Date().getTime() - s.getTime() >= 500);
3839-
client.close(done);
3839+
3840+
// TODO: forced because the cursor is still open/active
3841+
client.close(true, done);
38403842
}
38413843
});
38423844
});

test/functional/operation_example_tests.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -9296,7 +9296,8 @@ describe('Operation Examples', function() {
92969296
});
92979297

92989298
cursor.on('end', function() {
9299-
client.close(done);
9299+
// TODO: forced because the cursor is still open/active
9300+
client.close(true, done);
93009301
});
93019302
});
93029303
}

test/functional/operation_generators_example_tests.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6423,7 +6423,8 @@ describe('Operation (Generators)', function() {
64236423
});
64246424

64256425
cursor.on('end', function() {
6426-
client.close(err => {
6426+
// TODO: forced because the cursor is still open/active
6427+
client.close(true, err => {
64276428
if (err) return reject(err);
64286429
resolve();
64296430
});

test/functional/operation_promises_example_tests.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6982,7 +6982,8 @@ describe('Operation (Promises)', function() {
69826982
cursor.on('end', function() {
69836983
test.ok(new Date().getTime() - s.getTime() > 1000);
69846984

6985-
client.close(done);
6985+
// TODO: forced because the cursor is still open/active
6986+
client.close(true, done);
69866987
});
69876988
});
69886989
});

0 commit comments

Comments
 (0)