diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2018-01-15 19:18:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-15 19:18:21 +0800 |
commit | 7def684730ad3a684e64963961f3b33b308fd95d (patch) | |
tree | a6ae4d90140d523f40cf4c32ff34a3d29839dffd | |
parent | 10f961c27b0db61c3a197f8f88080d9197361ea4 (diff) | |
download | tracifyjs-7def684730ad3a684e64963961f3b33b308fd95d.tar.gz tracifyjs-7def684730ad3a684e64963961f3b33b308fd95d.zip |
improve `test/travis-ufuzz.js` (#2789)
- wait for instance to boot
- run on forked repositories
- workaround `request_limit_reached`
-rw-r--r-- | test/travis-ufuzz.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/travis-ufuzz.js b/test/travis-ufuzz.js index 0ed76823..8685732f 100644 --- a/test/travis-ufuzz.js +++ b/test/travis-ufuzz.js @@ -1,12 +1,15 @@ "use strict"; -var period = 20 * 60 * 1000; +var period = 45 * 60 * 1000; +var wait = 2 * 60 * 1000; +var ping = 5 * 60 * 1000; if (process.argv.length > 2) { var token = process.argv[2]; var branch = process.argv[3] || "v" + require("../package.json").version; + var project = encodeURIComponent(process.argv[4] || "mishoo/UglifyJS2"); (function init() { - setTimeout(init, period); - var options = require("url").parse("https://api.travis-ci.org/repo/mishoo%2FUglifyJS2/requests"); + setTimeout(init, period + wait); + var options = require("url").parse("https://api.travis-ci.org/repo/" + project + "/requests"); options.method = "POST"; options.headers = { "Content-Type": "application/json", @@ -51,7 +54,7 @@ if (process.argv.length > 2) { var end = line.lastIndexOf("\r"); console.log(line.slice(line.lastIndexOf("\r", end - 1) + 1, end)); line = line.slice(end + 1); - }, 5 * 60 * 1000); + }, ping); setTimeout(function() { clearInterval(keepAlive); child.kill(); |