You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Add example test with grunt and mocha.
Add test for reconnect. Run each test for both parsers and both IP versions. Don't save a reference to this nodified assertion function. Add DEBUG env var which enables extra debug logging in node_redis. Remove Grunt, run Redis on 6378 for non-interference. Remove the tests already ported to Mocha. Port reconnect after pubsub test; add subscribed after reconnect test. Reconnet after pubsub test confused me. I don't think it tested anything, and it didn't pass for me after I ported it. I've disabled it and added a note. In its place, I've added a test to make sure we are still subscribed and can receive pubsub messages after a reconnect. Move test suite config-like stuff into a library. Move test suite createClient args generation into the config library. WIP. Some select tests, most disabled and still WIP.
This commit is contained in:
committed by
Benjamin Coe
parent
6cae0b880f
commit
2b44245056
23
test/lib/redis-process.js
Normal file
23
test/lib/redis-process.js
Normal file
@@ -0,0 +1,23 @@
|
||||
var cp = require('child_process');
|
||||
|
||||
module.exports = {
|
||||
start: function (done, isSocket) {
|
||||
var confFile = isSocket ? "test/conf/redis-socket.conf" : "test/conf/redis.conf";
|
||||
var redis = cp.spawn("redis-server", [confFile]);
|
||||
|
||||
redis.once('err', done);
|
||||
setTimeout(function (data) {
|
||||
redis.removeListener('err', done);
|
||||
done();
|
||||
}, 1000);
|
||||
|
||||
return {
|
||||
stop: function (done) {
|
||||
redis.once("exit", function () {
|
||||
done();
|
||||
});
|
||||
redis.kill("SIGINT");
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user