redis-connection-pool
Advanced tools
Comparing version 1.5.0 to 1.5.1
{ | ||
"name": "redis-connection-pool", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "a redis client connection pool", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
/** | ||
* redis-connection-pool.js | ||
* | ||
* copyright 2012-2016 Nick Jennings (https://github.com/silverbucket) | ||
* copyright 2012 Nick Jennings (https://github.com/silverbucket) | ||
* | ||
@@ -622,5 +622,6 @@ * licensed under the MIT license. | ||
client.on('ready', function () { | ||
client.server_info = client.server_info || {}; | ||
self.version_string = client.server_info.redis_version; | ||
self.version_array = client.server_info.versions; | ||
if (self.version_array[0] < 2) { | ||
if (!self.version_array || self.version_array[0] < 2) { | ||
self.blocking_support = false; | ||
@@ -627,0 +628,0 @@ } |
@@ -69,4 +69,24 @@ if (typeof define !== 'function') { | ||
} | ||
}, | ||
{ | ||
desc: 'check alternate host setting', | ||
run: function (env, test) { | ||
env.redisPool = env.RedisPool('redisPoolTests1234', { | ||
host: '1.2.3.4', | ||
port: 1234, | ||
max_clients: 12, | ||
perform_checks: true | ||
}); | ||
test.assertAnd(env.redisPool.host, '1.2.3.4'); | ||
test.assertAnd(env.redisPool.port, 1234); | ||
test.assert(env.redisPool.max_clients, 12); | ||
}, | ||
takedown: function (env, test) { | ||
env.redisPool.clean(env.channel + '*', function () { | ||
test.result(true); | ||
}); | ||
delete env.redisPool; | ||
} | ||
} | ||
] | ||
@@ -73,0 +93,0 @@ }, |
Sorry, the diff of this file is not supported yet
297692
3728