Skip to content

Commit 27eac2f

Browse files
author
Ruben Bridgewater
committed
Prevent a race condition by just forcefully ending the connection in the test
1 parent a1755b9 commit 27eac2f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/multi.spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ describe("The 'multi' method", function () {
137137
client.monitor(function (e) {
138138
client.on('error', function (err) {
139139
assert.strictEqual(err.code, 'EXECABORT');
140+
client.end(false);
140141
done();
141142
});
142143
var multi = client.multi();
@@ -149,6 +150,7 @@ describe("The 'multi' method", function () {
149150
// Check that using monitor with a transactions results in an error
150151
client.multi().set('foo', 'bar').monitor().exec(function (err, res) {
151152
assert.strictEqual(err.code, 'EXECABORT');
153+
client.end(false);
152154
done();
153155
});
154156
});

0 commit comments

Comments
 (0)