From 68f2a8894eef18d79936ff84d03b0fbcde379639 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Sat, 26 Mar 2016 12:44:13 +0100 Subject: [PATCH] Make test more robust The redis server ends the connection and the stream end might be triggered before the quit command returned and is therefor racy. --- test/multi.spec.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/multi.spec.js b/test/multi.spec.js index a94c2bae99..6d7bb6fcec 100644 --- a/test/multi.spec.js +++ b/test/multi.spec.js @@ -101,9 +101,8 @@ describe("The 'multi' method", function () { beforeEach(function (done) { client = redis.createClient.apply(null, args); client.once('ready', function () { - client.quit(); + client.quit(done); }); - client.once('end', done); }); it('reports an error', function (done) {