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 multi not being executed on node 0.10 if not yet ready. Closes #889
This commit is contained in:
@@ -50,6 +50,26 @@ describe("The 'multi' method", function () {
|
||||
describe("when connected", function () {
|
||||
var client;
|
||||
|
||||
beforeEach(function (done) {
|
||||
client = redis.createClient.apply(redis.createClient, args);
|
||||
client.once("connect", done);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
});
|
||||
|
||||
it("executes a pipelined multi properly in combination with the offline queue", function (done) {
|
||||
var multi1 = client.multi();
|
||||
multi1.set("m1", "123");
|
||||
multi1.get('m1');
|
||||
multi1.exec(done);
|
||||
});
|
||||
});
|
||||
|
||||
describe("when ready", function () {
|
||||
var client;
|
||||
|
||||
beforeEach(function (done) {
|
||||
client = redis.createClient.apply(redis.createClient, args);
|
||||
client.once("ready", function () {
|
||||
@@ -73,7 +93,7 @@ describe("The 'multi' method", function () {
|
||||
assert.strictEqual(notBuffering, true);
|
||||
});
|
||||
|
||||
it("runs normal calls inbetween multis", function (done) {
|
||||
it("runs normal calls in-between multis", function (done) {
|
||||
var multi1 = client.multi();
|
||||
multi1.set("m1", "123");
|
||||
client.set('m2', '456', done);
|
||||
|
Reference in New Issue
Block a user