Skip to content

Commit ed610c7

Browse files
committed
add jest timeout instead
1 parent 5539f60 commit ed610c7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/cloud-pods.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ jobs:
9494
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
9595
run: |
9696
localstack pod load sample-cdk-rds
97-
sleep 10 # Wait for the Cloud Pod to be ready
9897
9998
- name: Install dependencies
10099
run: |

tests/cdk-rds.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ import {
1919
ListBucketsCommand
2020
} from '@aws-sdk/client-s3';
2121

22+
// Increase timeout for all tests to 30 seconds
23+
jest.setTimeout(30000);
24+
2225
const config = {
2326
endpoint: 'http://localhost:4566',
2427
region: 'us-east-1',
@@ -34,6 +37,12 @@ const secretsClient = new SecretsManagerClient(config);
3437
const s3Client = new S3Client(config);
3538

3639
describe('CDK RDS Stack', () => {
40+
// Add beforeAll to ensure LocalStack is ready
41+
beforeAll(async () => {
42+
// Wait for a few seconds to ensure LocalStack is fully initialized
43+
await new Promise(resolve => setTimeout(resolve, 5000));
44+
});
45+
3746
test('Lambda function exists', async () => {
3847
try {
3948
const command = new GetFunctionCommand({

0 commit comments

Comments
 (0)