1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +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:
Ruben Bridgewater
2016-03-31 19:21:14 +02:00
parent 79c1767f86
commit 14170f9d02
21 changed files with 136 additions and 86 deletions

View File

@@ -54,8 +54,8 @@ describe('client authentication', function () {
assert.strictEqual('retry worked', res);
var now = Date.now();
// Hint: setTimeout sometimes triggers early and therefor the value can be like one or two ms to early
assert(now - time >= 198, 'Time should be above 200 ms (the reconnect time) and is ' + (now - time));
assert(now - time < 300, 'Time should be below 300 ms (the reconnect should only take a bit above 200 ms) and is ' + (now - time));
assert(now - time >= 98, 'Time should be above 100 ms (the reconnect time) and is ' + (now - time));
assert(now - time < 225, 'Time should be below 255 ms (the reconnect should only take a bit above 100 ms) and is ' + (now - time));
done();
});
var tmp = client.command_queue.get(0).callback;