You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
slight refactor from code review
smoke test large list of commands ported more tests to mocha, some slight cleanup in tests move sinon and uuid to dev dependencies finished porting eval tests over to mocha rebased mocha testing branch with master ported client and script tests ported watch tests ported detect_buffers tests ported unref tests ported auth tests over to mocha ported idle and no_delay tests ported hlen, hset continuing marching forward ported hincrby, sinter, sort, pubsub tests. improved logic in redis-process, I was still occasionally having issues where redis failed to exit. switch back to default test command ported del, exists, hlen, keys, randomkey, type cleanup based on what I've learned so far from refactor. we now start and stop redis less often. moved tests to their final resting place finished porting node_redis client tests ported hgetall, mget, msetnx, rename, renamenx, setex, setnx ported hgetall, mget, msetnx, rename, renamenx, setex, setnx ported queue tests to mocha amalgamated some of the helper logic ported sadd, scard, sismember, srem, utf-8
This commit is contained in:
18
test/lib/unref.js
Normal file
18
test/lib/unref.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// spawned by the unref tests in node_redis.spec.js.
|
||||
// when configured, unref causes the client to exit
|
||||
// as soon as there are no outstanding commands.
|
||||
'use strict';
|
||||
|
||||
var redis = require("../../");
|
||||
//redis.debug_mode = true
|
||||
var HOST = process.argv[2] || '127.0.0.1';
|
||||
var PORT = process.argv[3]
|
||||
var args = PORT ? [PORT, HOST] : [HOST]
|
||||
|
||||
var c = redis.createClient.apply(redis, args);
|
||||
c.unref();
|
||||
c.info(function (err, reply) {
|
||||
if (err) process.exit(-1);
|
||||
if (!reply.length) process.exit(-1);
|
||||
process.stdout.write(reply.length.toString());
|
||||
});
|
Reference in New Issue
Block a user