Skip to content

Commit ec3bfc3

Browse files
committed
fix test
1 parent 2447b1e commit ec3bfc3

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/unit/sdam/topology.test.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,8 @@ describe('Topology (unit)', function () {
470470
// occurs `requestCheck` will be called for an immediate check.
471471
expect(requestCheck).property('callCount').to.equal(1);
472472

473-
topology.close({}, done);
473+
topology.close();
474+
done();
474475
});
475476
});
476477
});
@@ -483,11 +484,12 @@ describe('Topology (unit)', function () {
483484
});
484485

485486
topology.close();
486-
topology.selectServer(ReadPreference.primary, { serverSelectionTimeoutMS: 2000 }, err => {
487-
expect(err).to.exist;
488-
expect(err).to.match(/Topology is closed/);
489-
done();
490-
});
487+
topology
488+
.selectServer(ReadPreference.primary, { serverSelectionTimeoutMS: 2000 })
489+
.then(expect.fail, err => {
490+
expect(err).to.match(/Topology is closed/);
491+
done();
492+
});
491493
});
492494

493495
describe('waitQueue', function () {

0 commit comments

Comments
 (0)