[Pkg-javascript-commits] [uglifyjs] 443/491: fix time-out for respawned `test/ufuzz.js` (#2814)
Jonas Smedegaard
dr at jones.dk
Wed Feb 14 19:52:02 UTC 2018
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag debian/3.3.10-1
in repository uglifyjs.
commit 81b64549ce1933974c904077eb3272ee0d4f4cf3
Author: Alex Lam S.L <alexlamsl at gmail.com>
Date: Fri Jan 19 06:11:19 2018 +0800
fix time-out for respawned `test/ufuzz.js` (#2814)
---
test/travis-ufuzz.js | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/test/travis-ufuzz.js b/test/travis-ufuzz.js
index f84ed68..36d1fc1 100644
--- a/test/travis-ufuzz.js
+++ b/test/travis-ufuzz.js
@@ -8,7 +8,8 @@ var period = 45 * 60 * 1000;
var wait = 2 * 60 * 1000;
var ping = 5 * 60 * 1000;
if (process.argv[2] == "run") {
- for (var i = 0; i < 2; i++) spawn();
+ var endTime = Date.now() + period;
+ for (var i = 0; i < 2; i++) spawn(endTime);
} else if (process.argv.length > 2) {
var token = process.argv[2];
var branch = process.argv[3] || "v" + require("../package.json").version;
@@ -47,7 +48,7 @@ if (process.argv[2] == "run") {
console.log("Usage: test/travis-ufuzz.js <token> [branch] [repository] [concurrency]");
}
-function spawn() {
+function spawn(endTime) {
var child = child_process.spawn("node", [
"--max-old-space-size=2048",
"test/ufuzz"
@@ -70,12 +71,12 @@ function spawn() {
clearInterval(keepAlive);
child.removeListener("exit", respawn);
child.kill();
- }, period);
+ }, endTime - Date.now());
function respawn() {
console.log(line);
clearInterval(keepAlive);
clearTimeout(timer);
- spawn();
+ spawn(endTime);
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git
More information about the Pkg-javascript-commits
mailing list