You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
Do not run all tests with every single connection (if one connection works, the others are going to be fine too)
This commit is contained in:
@@ -108,22 +108,27 @@ module.exports = {
|
||||
}
|
||||
return true;
|
||||
},
|
||||
allTests: function (cb) {
|
||||
[undefined].forEach(function (options) { // add buffer option at some point
|
||||
describe(options && options.return_buffers ? "returning buffers" : "returning strings", function () {
|
||||
var parsers = ['javascript'];
|
||||
var protocols = ['IPv4'];
|
||||
if (process.platform !== 'win32') {
|
||||
parsers.push('hiredis');
|
||||
protocols.push('IPv6');
|
||||
allTests: function (options, cb) {
|
||||
if (!cb) {
|
||||
cb = options;
|
||||
options = {};
|
||||
}
|
||||
// TODO: Test all different option cases at some point (e.g. buffers)
|
||||
// [undefined, { return_buffers: true }].forEach(function (config_options) {
|
||||
// describe(config_options && config_options.return_buffers ? "returning buffers" : "returning strings", function () {
|
||||
// });
|
||||
// });
|
||||
var parsers = ['javascript'];
|
||||
var protocols = ['IPv4'];
|
||||
if (process.platform !== 'win32') {
|
||||
parsers.push('hiredis');
|
||||
protocols.push('IPv6', '/tmp/redis.sock');
|
||||
}
|
||||
parsers.forEach(function (parser) {
|
||||
protocols.forEach(function (ip, i) {
|
||||
if (i === 0 || options.allConnections) {
|
||||
cb(parser, ip, config.configureClient(parser, ip));
|
||||
}
|
||||
|
||||
parsers.forEach(function (parser) {
|
||||
if (process.platform !== 'win32') cb(parser, "/tmp/redis.sock", config.configureClient(parser, "/tmp/redis.sock", options));
|
||||
protocols.forEach(function (ip) {
|
||||
cb(parser, ip, config.configureClient(parser, ip, options));
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
Reference in New Issue
Block a user