You've already forked node-redis
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:
@@ -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 () {
|
||||
|
Reference in New Issue
Block a user