Skip to content

Commit

Permalink
fix: Handle run pausing in load test
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcsmith committed Dec 2, 2024
1 parent ce6cc6d commit 6511787
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion load-tests/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,16 @@ export default function () {

const run = getRunResponse.json();

if (!['running', 'pending'].includes(run.status)) {
if (!['running', 'pending', 'paused'].includes(run.status)) {

check(run, {
'run completed': (r) => r.status === 'done'
});

if (! "word" in run.result) {
throw new Error('Missing required result field');
}

check(run, {
'found needle word': (r) => r.result.word === 'needle'
});
Expand Down

0 comments on commit 6511787

Please sign in to comment.