Skip to content

Commit 0f38341

Browse files
committed
Wait 15 seconds before checking API
1 parent 625ae85 commit 0f38341

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

lib/init-action-post.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/init-action-post.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ async function testCancellationDetection(): Promise<void> {
6464
return;
6565
}
6666

67+
// Wait 15 seconds to ensure that the API has caught up with the job status
68+
await new Promise((resolve) => setTimeout(resolve, 15000));
69+
6770
const checkRunId = parseInt(checkRunIdInput, 10);
6871
logger.info(
6972
`[Cancellation Test] Querying jobs API for run ${runId}, attempt ${attemptNumber}, check_run_id ${checkRunId}`,
@@ -127,12 +130,12 @@ async function run(startedAt: Date) {
127130
| undefined;
128131
let dependencyCachingUsage: DependencyCachingUsageReport | undefined;
129132
try {
130-
// TEMPORARY: Test cancellation detection via API
131-
await testCancellationDetection();
132-
133133
// Restore inputs from `init` Action.
134134
restoreInputs();
135135

136+
// TEMPORARY: Test cancellation detection via API
137+
await testCancellationDetection();
138+
136139
const gitHubVersion = await getGitHubVersion();
137140
checkGitHubVersionInRange(gitHubVersion, logger);
138141

0 commit comments

Comments
 (0)