You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
tests: remove unused parser
client option from all tests & helpers
This commit is contained in:
@@ -147,9 +147,9 @@ describe('connection tests', function () {
|
||||
|
||||
});
|
||||
|
||||
helper.allTests(function (parser, ip, args) {
|
||||
helper.allTests(function (ip, args) {
|
||||
|
||||
describe('using ' + parser + ' and ' + ip, function () {
|
||||
describe('using ' + ip, function () {
|
||||
|
||||
describe('on lost connection', function () {
|
||||
it('emit an error after max retry timeout and do not try to reconnect afterwards', function (done) {
|
||||
@@ -158,7 +158,6 @@ describe('connection tests', function () {
|
||||
|
||||
var connect_timeout = 600; // in ms
|
||||
client = redis.createClient({
|
||||
parser: parser,
|
||||
connect_timeout: connect_timeout
|
||||
});
|
||||
var time = 0;
|
||||
@@ -189,7 +188,6 @@ describe('connection tests', function () {
|
||||
it('end connection while retry is still ongoing', function (done) {
|
||||
var connect_timeout = 1000; // in ms
|
||||
client = redis.createClient({
|
||||
parser: parser,
|
||||
connect_timeout: connect_timeout
|
||||
});
|
||||
|
||||
@@ -304,7 +302,6 @@ describe('connection tests', function () {
|
||||
it('emit an error after the socket timeout exceeded the connect_timeout time', function (done) {
|
||||
var connect_timeout = 500; // in ms
|
||||
client = redis.createClient({
|
||||
parser: parser,
|
||||
// Auto detect ipv4 and use non routable ip to trigger the timeout
|
||||
host: '10.255.255.1',
|
||||
connect_timeout: connect_timeout
|
||||
@@ -337,7 +334,6 @@ describe('connection tests', function () {
|
||||
|
||||
it('use the system socket timeout if the connect_timeout has not been provided', function (done) {
|
||||
client = redis.createClient({
|
||||
parser: parser,
|
||||
host: '2001:db8::ff00:42:8329' // auto detect ip v6
|
||||
});
|
||||
assert.strictEqual(client.address, '2001:db8::ff00:42:8329:6379');
|
||||
@@ -350,21 +346,20 @@ describe('connection tests', function () {
|
||||
|
||||
it('clears the socket timeout after a connection has been established', function (done) {
|
||||
client = redis.createClient({
|
||||
parser: parser,
|
||||
connect_timeout: 1000
|
||||
});
|
||||
process.nextTick(function () {
|
||||
// node > 4
|
||||
// node > 6
|
||||
var timeout = client.stream.timeout;
|
||||
// node <= 4
|
||||
// node <= 6
|
||||
if (timeout === undefined) timeout = client.stream._idleTimeout;
|
||||
assert.strictEqual(timeout, 1000);
|
||||
});
|
||||
client.on('connect', function () {
|
||||
// node > 4
|
||||
// node > 6
|
||||
var expected = 0;
|
||||
var timeout = client.stream.timeout;
|
||||
// node <= 4
|
||||
// node <= 6
|
||||
if (timeout === undefined) {
|
||||
timeout = client.stream._idleTimeout;
|
||||
expected = -1;
|
||||
@@ -379,7 +374,6 @@ describe('connection tests', function () {
|
||||
client = redis.createClient({
|
||||
host: 'localhost',
|
||||
port: '6379',
|
||||
parser: parser,
|
||||
connect_timeout: 1000
|
||||
});
|
||||
|
||||
@@ -392,7 +386,6 @@ describe('connection tests', function () {
|
||||
}
|
||||
client = redis.createClient({
|
||||
path: '/tmp/redis.sock',
|
||||
parser: parser,
|
||||
connect_timeout: 1000
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user