Skip to content

Commit 26f24bd

Browse files
authored
fix the cloud pod tests workflow (#14)
* fix the cloud pod tests workflow * run on pr * add jest timeout instead * final tests done * final tests done
1 parent 9a4e5a3 commit 26f24bd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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)