Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test flakiness due to using inconsistent time. (backport #2485) #2487

Open
wants to merge 1 commit into
base: release/indexer/v7.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading