1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

Fix an issue with .multi after a reconnect on node 0.10

Add .path to .createClient options object for unix sockets
This commit is contained in:
Ruben Bridgewater
2015-10-29 23:21:08 +01:00
parent c3502c799f
commit d454e4025b
6 changed files with 113 additions and 87 deletions

View File

@@ -65,6 +65,31 @@ describe("The 'multi' method", function () {
multi1.get('m1');
multi1.exec(done);
});
it("executes a pipelined multi properly after a reconnect in combination with the offline queue", function (done) {
client.once('ready', function () {
client.stream.destroy();
var called = false;
var multi1 = client.multi();
multi1.set("m1", "123");
multi1.get('m1');
multi1.exec(function (err, res) {
assert(!err);
called = true;
});
client.once('ready', function () {
var multi1 = client.multi();
multi1.set("m2", "456");
multi1.get('m2');
multi1.exec(function (err, res) {
assert(called);
assert(!err);
assert.strictEqual(res, '456');
done();
});
});
});
});
});
describe("when connection is broken", function () {