Skip to content

Commit bf9e916

Browse files
go back to set immediate
1 parent 9a4eecc commit bf9e916

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/integration/node-specific/cursor_stream.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
const { expect } = require('chai');
33
const { Binary } = require('../../mongodb');
4-
const { setTimeout } = require('timers');
4+
const { setTimeout, setImmediate } = require('timers');
55

66
describe('Cursor Streams', function () {
77
let client;
@@ -296,10 +296,10 @@ describe('Cursor Streams', function () {
296296
const stream = cursor.stream();
297297
stream.on('error', err => (error = err));
298298
cursor.on('close', function () {
299-
setTimeout(() => {
299+
setImmediate(() => {
300300
expect(error).to.exist;
301301
client.close(done);
302-
}, 50);
302+
});
303303
});
304304

305305
stream.pipe(process.stdout);

0 commit comments

Comments
 (0)