1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00
Files
node-redis/test/lib/redis-process.js
Erin Spiceland 2b44245056 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.
2015-08-14 21:30:12 -07:00

24 lines
621 B
JavaScript

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");
}
};
}
};