Bug 42733: Job progress fix

waitForJobFinished previously had no handling for failed jobs or
non-200 responses — if the job API returned anything unexpected,
the recursive cy.wait() would silently stall waiting for a 2nd
poll that never came, producing a confusing timeout. Adds an
explicit "failed" status check and updates the intercept
to reproduce the exact CI failure (Apache returning 503 during
reset_all).

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Pedro Amorim 2026-06-01 13:37:21 +00:00 committed by Lucas Gass
parent f0bb03d6e9
commit 74cf164d32
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 4 additions and 0 deletions

View File

@ -47,5 +47,9 @@ function updateProgress(job_id, callbacks) {
updateProgress(job_id, callbacks);
}, 1 * 1000);
}
}).fail(function () {
setTimeout(function () {
updateProgress(job_id, callbacks);
}, 1 * 1000);
});
}