Skip to content

Commit

Permalink
Merge pull request #12 from espekkaya/master
Browse files Browse the repository at this point in the history
Fix not download files because of an early throw error.
  • Loading branch information
bwachter authored Nov 14, 2022
2 parents c929c9a + c688ad1 commit 7b9a912
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/schedule-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,16 @@ exports.scheduleRun = async function (params) {
", " + err);
}
}
throw("Test run failed after " + i*wait_interval + " seconds with: " + run_status.run.resultCode + ". Timeout is set to " + max_wait*wait_interval);
}

run.downloaded_artifacts = await artifacts.getArtifact({file_artifacts: params.file_artifacts,
screenshot_artifacts: params.screenshot_artifacts,
log_artifacts: params.log_artifacts,
arn: run.run.arn});

if (run_status.run.result != "PASSED") {
throw("Test run failed after " + i*wait_interval + " seconds with: " + run_status.run.resultCode + ". Timeout is set to " + max_wait*wait_interval);
}

return run_status;
}
5 changes: 4 additions & 1 deletion test-application/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,14 +411,17 @@ exports.scheduleRun = async function (params) {
", " + err);
}
}
throw("Test run failed after " + i*wait_interval + " seconds with: " + run_status.run.resultCode + ". Timeout is set to " + max_wait*wait_interval);
}

run.downloaded_artifacts = await artifacts.getArtifact({file_artifacts: params.file_artifacts,
screenshot_artifacts: params.screenshot_artifacts,
log_artifacts: params.log_artifacts,
arn: run.run.arn});

if (run_status.run.result != "PASSED") {
throw("Test run failed after " + i*wait_interval + " seconds with: " + run_status.run.resultCode + ". Timeout is set to " + max_wait*wait_interval);
}

return run_status;
}

Expand Down

0 comments on commit 7b9a912

Please sign in to comment.