1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Add regression test

This commit is contained in:
Ruben Bridgewater
2015-10-27 00:35:31 +01:00
parent 399a29a97c
commit ebea0872a9

View File

@@ -537,6 +537,22 @@ describe("The 'multi' method", function () {
});
});
it("works properly after a reconnect. issue #897", function (done) {
helper.serverVersionAtLeast.call(this, client, [2, 6, 5]);
client.stream.destroy();
client.on('error', function (err) {
assert.strictEqual(err.code, 'ECONNREFUSED');
});
client.on('ready', function () {
client.multi([['set', 'foo', 'bar'], ['get', 'foo']]).exec(function (err, res) {
assert(!err);
assert.strictEqual(res[1], 'bar');
done();
});
});
});
});
});
});