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

Remove socket_no_delay

This commit is contained in:
Ruben Bridgewater
2016-12-17 17:22:11 +01:00
committed by Ruben Bridgewater
parent f20f704a3e
commit 2f6c421006
3 changed files with 0 additions and 93 deletions

View File

@@ -757,83 +757,6 @@ describe('The node_redis client', function () {
// });
});
describe('socket_nodelay', function () {
describe('true', function () {
var args = config.configureClient(parser, ip, {
socket_nodelay: true
});
it("fires client.on('ready')", function (done) {
client = redis.createClient.apply(null, args);
client.on('ready', function () {
assert.strictEqual(true, client.options.socket_nodelay);
client.quit(done);
});
});
it('client is functional', function (done) {
client = redis.createClient.apply(null, args);
client.on('ready', function () {
assert.strictEqual(true, client.options.socket_nodelay);
client.set(['set key 1', 'set val'], helper.isString('OK'));
client.set(['set key 2', 'set val'], helper.isString('OK'));
client.get(['set key 1'], helper.isString('set val'));
client.get(['set key 2'], helper.isString('set val'));
client.quit(done);
});
});
});
describe('false', function () {
var args = config.configureClient(parser, ip, {
socket_nodelay: false
});
it("fires client.on('ready')", function (done) {
client = redis.createClient.apply(null, args);
client.on('ready', function () {
assert.strictEqual(false, client.options.socket_nodelay);
client.quit(done);
});
});
it('client is functional', function (done) {
client = redis.createClient.apply(null, args);
client.on('ready', function () {
assert.strictEqual(false, client.options.socket_nodelay);
client.set(['set key 1', 'set val'], helper.isString('OK'));
client.set(['set key 2', 'set val'], helper.isString('OK'));
client.get(['set key 1'], helper.isString('set val'));
client.get(['set key 2'], helper.isString('set val'));
client.quit(done);
});
});
});
describe('defaults to true', function () {
it("fires client.on('ready')", function (done) {
client = redis.createClient.apply(null, args);
client.on('ready', function () {
assert.strictEqual(true, client.options.socket_nodelay);
client.quit(done);
});
});
it('client is functional', function (done) {
client = redis.createClient.apply(null, args);
client.on('ready', function () {
assert.strictEqual(true, client.options.socket_nodelay);
client.set(['set key 1', 'set val'], helper.isString('OK'));
client.set(['set key 2', 'set val'], helper.isString('OK'));
client.get(['set key 1'], helper.isString('set val'));
client.get(['set key 2'], helper.isString('set val'));
client.quit(done);
});
});
});
});
describe('retry_max_delay', function () {
it('sets upper bound on how long client waits before reconnecting', function (done) {
var time;