1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Use higher time difference for slow machines in tests

This commit is contained in:
Ruben Bridgewater
2015-10-30 01:33:51 +01:00
parent cc79b2db69
commit 2cc01f52b6
2 changed files with 7 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
Changelog
=========
## v.2.3.0 - xx XXX, 2015
## v.2.3.0 - 30 Oct, 2015
Features

View File

@@ -351,8 +351,9 @@ describe("connection tests", function () {
};
client.on("ready", function () {
var rest = Date.now() - time;
// Be on the safe side and accept 100ms above the original value
assert(rest - 100 < 500 && rest >= 500);
assert(rest >= 500);
// Be on the safe side and accept 200ms above the original value
assert(rest - 200 < 500);
assert(delayed);
end();
});
@@ -380,8 +381,9 @@ describe("connection tests", function () {
};
client.on("ready", function () {
var rest = Date.now() - time;
// Be on the safe side and accept 100ms above the original value
assert(rest - 100 < 1000 && rest >= 1000);
assert(rest >= 1000);
// Be on the safe side and accept 200ms above the original value
assert(rest - 200 < 1000);
assert(delayed);
end();
});