Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Conversation

@iliapolo
Copy link
Contributor

@iliapolo iliapolo commented Apr 8, 2025

Currently, the global timeout is set to 10 minutes. However, most of our tests also have overrides that set it to 2 hours. There are also tests which don't have this override, for example:

import { TestFixture, withDefaultFixture } from '../../lib/with-cdk-app';
const docker = process.env.CDK_DOCKER ?? 'docker';
integTest(

Coincidentally, these are the ones failing in the canary runs:

FAIL ./cdk-import-interactive.integtest.js (611.412 s)
647 | ● cdk import prompts the user for sns topic arns
648 |  
649 | thrown: "Exceeded timeout of 600000 ms for a test.
650 | Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
651 |  
652 | 35 \|   const runner = shouldSkip(name) ? test.skip : test;
653 | 36 \|
654 | > 37 \|   runner(name, async () => {
655 | \|   ^
656 | 38 \|     const output = new MemoryStream();
657 | 39 \|
658 | 40 \|     output.write('================================================================\n');
659 |  
660 | at runner (../../lib/integ-test.ts:37:3)
661 | at Object.<anonymous> (cdk-import-interactive.integtest.ts:5:10)
662 |  
663 | FAIL ./proxy.integtest.js (612.584 s)
664 | ● all calls from isolated container go through proxy
665 |  
666 | thrown: "Exceeded timeout of 600000 ms for a test.
667 | Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
668 |  
669 | 35 \|   const runner = shouldSkip(name) ? test.skip : test;
670 | 36 \|
671 | > 37 \|   runner(name, async () => {
672 | \|   ^
673 | 38 \|     const output = new MemoryStream();
674 | 39 \|
675 | 40 \|     output.write('================================================================\n');
676 |  
677 | at runner (../../lib/integ-test.ts:37:3)
678 | at Object.<anonymous> (proxy.integtest.ts:10:10)
679 |  

They started failing because we increased the concurrency of the tests, which means the time to acquire locks is much higher now; but still - two hours is enough.

Instead of hunting down each individual test that doesn't have the 2 hour timeout, or reducing concurrency, lets just make the global timeout 2 hours.

@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue Apr 8, 2025
Merged via the queue into main with commit f09e4e3 Apr 8, 2025
18 checks passed
@aws-cdk-automation aws-cdk-automation deleted the epolon/global-timeout branch April 8, 2025 17:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants