diff --git a/lib/lib-dynamodb/src/test/lib-dynamodb.e2e.spec.ts b/lib/lib-dynamodb/src/test/lib-dynamodb.e2e.spec.ts index 75e2a7fd7806..589d0c9acc58 100644 --- a/lib/lib-dynamodb/src/test/lib-dynamodb.e2e.spec.ts +++ b/lib/lib-dynamodb/src/test/lib-dynamodb.e2e.spec.ts @@ -40,14 +40,14 @@ describe(DynamoDBDocument.name, () => { } } - // Random element limited to 0-99 to avoid concurrent build IO. // Tables will be dropped at the end of the test. // For faster test development, remove this random suffix and // don't delete the table in afterAll(). // The table will in that case be re-used. - const randId = String((Math.random() * 99) | 0); + const randId = (Math.random() + 1).toString(36).substring(2, 6); + const timestamp = (Date.now() / 1000) | 0; - const TableName = `js-sdk-dynamodb-test-${randId}`; + const TableName = `js-sdk-dynamodb-test-${timestamp}-${randId}`; const log = { describe: null as null | DescribeTableCommandOutput,