Skip to content

Commit

Permalink
Fix test flakiness due to using inconsistent time. (#2485)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9449952)
  • Loading branch information
vincentwschau authored and mergify[bot] committed Oct 15, 2024
1 parent 071aa31 commit 8da0322
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions indexer/services/comlink/__tests__/lib/helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ describe('helpers', () => {
),
};
const blockHeight2: string = '80';
const blockTime2: string = DateTime.fromISO(pnlTick.createdAt).plus({ hour: 1 }).toISO();
const blockTime2: string = DateTime.fromISO(pnlTick.createdAt).startOf('hour').plus({ minute: 61 }).toISO();
const pnlTick3: PnlTicksFromDatabase = {
...testConstants.defaultPnlTick,
id: PnlTicksTable.uuid(
Expand All @@ -880,7 +880,7 @@ describe('helpers', () => {
createdAt: blockTime2,
};
const blockHeight3: string = '81';
const blockTime3: string = DateTime.fromISO(pnlTick.createdAt).plus({ minute: 61 }).toISO();
const blockTime3: string = DateTime.fromISO(pnlTick.createdAt).startOf('hour').plus({ minute: 62 }).toISO();
const pnlTick4: PnlTicksFromDatabase = {
...testConstants.defaultPnlTick,
id: PnlTicksTable.uuid(
Expand Down

0 comments on commit 8da0322

Please sign in to comment.