Skip to content

Commit

Permalink
test: ensure client is closed at test completion
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Oct 15, 2019
1 parent ac29525 commit 7df03cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/core/functional/server_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1002,13 +1002,13 @@ describe('Server tests', function() {
let err;
try {
expect(error).to.be.an.instanceOf(Error);

const errorMessage = error.reason ? error.reason.message : error.message;
expect(errorMessage).to.match(/but this version of the Node.js Driver requires/);
} catch (e) {
err = e;
}
done(err);

client.close(err2 => done(err || err2));
});

client.on('connect', () => {
Expand Down

0 comments on commit 7df03cb

Please sign in to comment.