You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Indicate transmission errors
This commit is contained in:
@@ -115,9 +115,7 @@ describe("client authentication", function () {
|
||||
auth_pass: auth
|
||||
});
|
||||
client = redis.createClient.apply(null, args);
|
||||
client.on("ready", function () {
|
||||
return done();
|
||||
});
|
||||
client.on("ready", done);
|
||||
});
|
||||
|
||||
it('allows auth and no_ready_check to be provided as config option for client', function (done) {
|
||||
@@ -128,9 +126,7 @@ describe("client authentication", function () {
|
||||
no_ready_check: true
|
||||
});
|
||||
client = redis.createClient.apply(null, args);
|
||||
client.on("ready", function () {
|
||||
done();
|
||||
});
|
||||
client.on("ready", done);
|
||||
});
|
||||
|
||||
it('allows auth to be provided post-hoc with auth method', function (done) {
|
||||
@@ -139,25 +135,24 @@ describe("client authentication", function () {
|
||||
var args = config.configureClient(parser, ip);
|
||||
client = redis.createClient.apply(null, args);
|
||||
client.auth(auth);
|
||||
client.on("ready", function () {
|
||||
return done();
|
||||
});
|
||||
client.on("ready", done);
|
||||
});
|
||||
|
||||
it('reconnects with appropriate authentication', function (done) {
|
||||
if (helper.redisProcess().spawnFailed()) this.skip();
|
||||
|
||||
var readyCount = 0;
|
||||
client = redis.createClient.apply(null, args);
|
||||
client.auth(auth);
|
||||
client.on("ready", function () {
|
||||
readyCount++;
|
||||
if (readyCount === 1) {
|
||||
if (this.times_connected === 1) {
|
||||
client.stream.destroy();
|
||||
} else {
|
||||
return done();
|
||||
done();
|
||||
}
|
||||
});
|
||||
client.on('reconnecting', function (params) {
|
||||
assert.strictEqual(params.error.message, 'Stream connection closed');
|
||||
});
|
||||
});
|
||||
|
||||
it('should return an error if the password is not of type string and a callback has been provided', function (done) {
|
||||
|
Reference in New Issue
Block a user