diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-09-26 04:23:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-26 11:23:56 +0800 |
commit | 9882a9f4af95af4b0cba0a4a60a695ba2f6de04d (patch) | |
tree | 661c76c6359585f83fc9de0e286996028f661df3 /test/ufuzz/actions.js | |
parent | 40f36b9e0111ce76487f6f12e240545a0ea70003 (diff) | |
download | tracifyjs-9882a9f4af95af4b0cba0a4a60a695ba2f6de04d.tar.gz tracifyjs-9882a9f4af95af4b0cba0a4a60a695ba2f6de04d.zip |
fix corner case in `ufuzz` scheduling (#4154)
Diffstat (limited to 'test/ufuzz/actions.js')
-rw-r--r-- | test/ufuzz/actions.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/ufuzz/actions.js b/test/ufuzz/actions.js index b4d8c86b..6798aa46 100644 --- a/test/ufuzz/actions.js +++ b/test/ufuzz/actions.js @@ -15,18 +15,17 @@ exports.should_stop = function(callback) { }).sort(function(a, b) { return b.run_number - a.run_number; }); - if (runs.length < 10) return; var found = false, remaining = 20; (function next() { if (!runs.length) return; var workflow = runs.pop(); - if (workflow.run_number == run_number) found = true; + if (workflow.event == "schedule" && workflow.run_number == run_number) found = true; read(workflow.jobs_url, function(reply) { if (!reply || !Array.isArray(reply.jobs)) return; if (!reply.jobs.every(function(job) { if (job.status == "completed") return true; remaining--; - return found; + return found || workflow.event != "schedule"; })) return; if (remaining >= 0) { next(); |