Skip to content

Commit 61c346b

Browse files
committed
ensure cursorId is a Long
1 parent 7add18c commit 61c346b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/functional/cmap/connection.test.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ describe('Connection', function() {
9191
});
9292

9393
it('should support calling back multiple times on exhaust commands', {
94-
metadata: { requires: { mongodb: '>=4.2.0', topology: ['single'], ssl: false } },
94+
metadata: { requires: { mongodb: '>4.2.0', topology: ['single'], ssl: false } },
9595
test: function(done) {
9696
const ns = `${this.configuration.db}.$cmd`;
9797
const connectOptions = Object.assign(
@@ -122,7 +122,12 @@ describe('Connection', function() {
122122

123123
conn.command(
124124
ns,
125-
{ getMore: cursor.id, collection: 'test', batchSize: 100 },
125+
{
126+
getMore:
127+
typeof cursor.id === 'number' ? BSON.Long.fromNumber(cursor.id) : cursor.id,
128+
collection: 'test',
129+
batchSize: 100
130+
},
126131
{ exhaustAllowed: true },
127132
(err, result) => {
128133
expect(err).to.not.exist;

0 commit comments

Comments
 (0)