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

Remove deprecated max_delay

This commit is contained in:
Ruben Bridgewater
2016-12-17 17:42:03 +01:00
committed by Ruben Bridgewater
parent b3106a45c4
commit 59725e3f20
4 changed files with 0 additions and 65 deletions

View File

@@ -757,34 +757,6 @@ describe('The node_redis client', function () {
// });
});
describe('retry_max_delay', function () {
it('sets upper bound on how long client waits before reconnecting', function (done) {
var time;
var timeout = process.platform !== 'win32' ? 20 : 100;
client = redis.createClient.apply(null, config.configureClient(parser, ip, {
retry_max_delay: 1 // ms
}));
client.on('ready', function () {
if (this.times_connected === 1) {
this.stream.end();
time = Date.now();
} else {
done();
}
});
client.on('reconnecting', function () {
time = Date.now() - time;
assert(time < timeout, 'The reconnect should not have taken longer than ' + timeout + ' but it took ' + time);
});
client.on('error', function (err) {
// This is rare but it might be triggered.
// So let's have a robust test
assert.strictEqual(err.code, 'ECONNRESET');
});
});
});
describe('protocol error', function () {
it('should gracefully recover and only fail on the already send commands', function (done) {