You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Improve tests a bit
Reduce timeouts if possible Extend timeouts if needed (windows tests need their time) Don't expose the redis socket to others than the owner Don't create the stunnel log
This commit is contained in:
@@ -22,12 +22,11 @@ describe("The 'ttl' method", function () {
|
||||
it('returns the current ttl on a key', function (done) {
|
||||
client.set(['ttl key', 'ttl val'], helper.isString('OK'));
|
||||
client.expire(['ttl key', '100'], helper.isNumber(1));
|
||||
setTimeout(function () {
|
||||
client.TTL(['ttl key'], function (err, ttl) {
|
||||
assert.ok(ttl > 50 && ttl <= 100);
|
||||
return done(err);
|
||||
});
|
||||
}, 200);
|
||||
client.TTL(['ttl key'], function (err, ttl) {
|
||||
assert(ttl >= 99);
|
||||
assert(ttl <= 100);
|
||||
done(err);
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
|
Reference in New Issue
Block a user