Skip to content

Commit

Permalink
test(lib-dynamodb): add timestamp to table name in e2e tests (#5347)
Browse files Browse the repository at this point in the history
* test(lib-dynamodb): add timestamp to table name in e2e tests

* test(lib-dynamodb): additional table name randomness
  • Loading branch information
kuhe committed Oct 11, 2023
1 parent 6a6a75e commit e64bc58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/lib-dynamodb/src/test/lib-dynamodb.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e64bc58

Please sign in to comment.