Skip to content

Commit

Permalink
chore(cli): raise the timeout for the bootstrap test (#14740)
Browse files Browse the repository at this point in the history
The test case "upgrade legacy bootstrap stack to new bootstrap stack
while in use" has been observed to intermittently timeout. The standard
timeout of 10 minutes seems insufficient.

The cause seems to be CloudFormation, which in some cases, sits there
during an update for 10ish minutes perceivably doing nothing.

Example (account: 416588550161):
https://eu-west-2.console.aws.amazon.com/cloudformation/home?region=eu-west-2#/stacks/events?stackId=arn%3Aaws%3Acloudformation%3Aeu-west-2%3A416588550161%3Astack%2Fcdktest-07s3iezgzhzv-bootstrap-stack%2Fb38a15d0-b750-11eb-8ba6-0a290e8f7d04

Raise the timeout to 1 hour.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
Niranjan Jayakar authored May 18, 2021
1 parent 73b9b4a commit 8395d9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/aws-cdk/test/integ/cli/bootstrapping.integtest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ integTest('upgrade legacy bootstrap stack to new bootstrap stack while in use',
'--force',
],
});
}));
}), 3_600_000, // Observed in eu-west-2 that CF update takes over 10 minutes for this test.
);

integTest('can and deploy if omitting execution policies', withDefaultFixture(async (fixture) => {
const bootstrapStackName = fixture.bootstrapStackName;
Expand Down
9 changes: 6 additions & 3 deletions packages/aws-cdk/test/integ/helpers/test-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ export type TestContext = { readonly output: NodeJS.WritableStream; };
/**
* A wrapper for jest's 'test' which takes regression-disabled tests into account and prints a banner
*/
export function integTest(name: string,
callback: (context: TestContext) => Promise<void>) {
export function integTest(
name: string,
callback: (context: TestContext) => Promise<void>,
timeoutMillis?: number,
) {

// Integ tests can run concurrently, and are responsible for blocking themselves if they cannot.
const runner = shouldSkip(name) ? test.skip : test.concurrent;
Expand All @@ -36,7 +39,7 @@ export function integTest(name: string,
process.stderr.write('✅');
}
}
});
}, timeoutMillis);
}

function shouldSkip(testName: string) {
Expand Down

0 comments on commit 8395d9d

Please sign in to comment.