You've already forked node-redis
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:
@@ -1,7 +1,7 @@
|
|||||||
Changelog
|
Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
## v.2.3.0 - xx XXX, 2015
|
## v.2.3.0 - 30 Oct, 2015
|
||||||
|
|
||||||
Features
|
Features
|
||||||
|
|
||||||
|
@@ -351,8 +351,9 @@ describe("connection tests", function () {
|
|||||||
};
|
};
|
||||||
client.on("ready", function () {
|
client.on("ready", function () {
|
||||||
var rest = Date.now() - time;
|
var rest = Date.now() - time;
|
||||||
// Be on the safe side and accept 100ms above the original value
|
assert(rest >= 500);
|
||||||
assert(rest - 100 < 500 && rest >= 500);
|
// Be on the safe side and accept 200ms above the original value
|
||||||
|
assert(rest - 200 < 500);
|
||||||
assert(delayed);
|
assert(delayed);
|
||||||
end();
|
end();
|
||||||
});
|
});
|
||||||
@@ -380,8 +381,9 @@ describe("connection tests", function () {
|
|||||||
};
|
};
|
||||||
client.on("ready", function () {
|
client.on("ready", function () {
|
||||||
var rest = Date.now() - time;
|
var rest = Date.now() - time;
|
||||||
// Be on the safe side and accept 100ms above the original value
|
assert(rest >= 1000);
|
||||||
assert(rest - 100 < 1000 && rest >= 1000);
|
// Be on the safe side and accept 200ms above the original value
|
||||||
|
assert(rest - 200 < 1000);
|
||||||
assert(delayed);
|
assert(delayed);
|
||||||
end();
|
end();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user