Skip to content

Commit

Permalink
Fix Migration 00001_accounts flaky test (#2142)
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorgomezv authored Nov 19, 2024
1 parent 0b9df72 commit 0ca4a6a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions migrations/deprecated/__tests__/00001_accounts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ describe('Migration 00001_accounts', () => {
after: async (sql: Sql): Promise<AccountRow[]> => {
await sql`INSERT INTO groups (id) VALUES (1);`;
await sql`INSERT INTO accounts (id, group_id, address) VALUES (1, 1, '0x0000');`;
// wait for 1 millisecond to ensure that the updated_at timestamp is different
await waitMilliseconds(1);
await sql`UPDATE accounts set address = '0x0001' WHERE id = 1;`;
return await sql<AccountRow[]>`SELECT * FROM accounts`;
},
Expand Down

0 comments on commit 0ca4a6a

Please sign in to comment.