From 27eac2f594f58a3acf579f0bbfb2ea276312c9a9 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Fri, 29 Apr 2016 13:07:40 +0200 Subject: [PATCH] Prevent a race condition by just forcefully ending the connection in the test --- test/multi.spec.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/multi.spec.js b/test/multi.spec.js index 8deae7f920..9010759378 100644 --- a/test/multi.spec.js +++ b/test/multi.spec.js @@ -137,6 +137,7 @@ describe("The 'multi' method", function () { client.monitor(function (e) { client.on('error', function (err) { assert.strictEqual(err.code, 'EXECABORT'); + client.end(false); done(); }); var multi = client.multi(); @@ -149,6 +150,7 @@ describe("The 'multi' method", function () { // Check that using monitor with a transactions results in an error client.multi().set('foo', 'bar').monitor().exec(function (err, res) { assert.strictEqual(err.code, 'EXECABORT'); + client.end(false); done(); }); });