Skip to content

Commit a6f6da0

Browse files
committed
test: wait for mock server creation before using it
1 parent 611be8d commit a6f6da0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

test/unit/cmap/connection_pool.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ function closePool(pool) {
4141
describe('Connection Pool', function() {
4242
let server;
4343
after(() => mock.cleanup());
44-
before(() => {
45-
mock.createServer().then(s => (server = s));
46-
});
44+
before(() => mock.createServer().then(s => (server = s)));
4745

4846
it('should destroy connections which have been closed', function(done) {
4947
server.setMessageHandler(request => {

0 commit comments

Comments
 (0)