Skip to content

Commit

Permalink
Use the default time drift buffer that's generally worked for previou…
Browse files Browse the repository at this point in the history
…s candlestick tests
  • Loading branch information
xbtmatt committed Mar 3, 2025
1 parent 19d9a7d commit 0bf65f6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/typescript/sdk/tests/e2e/arena/candlesticks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import {
import { getPublisher } from "../../utils/helpers";
import type { Account } from "@aptos-labs/ts-sdk";

const TWO_SECONDS = 2000;

describe("ensures arena candlesticks work", () => {
const emojicoin = new EmojicoinClient();

Expand Down Expand Up @@ -151,7 +153,8 @@ describe("ensures arena candlesticks work", () => {
const now = new Date().getTime();
const fifteenSecondStart = now - (now % 15000);
const fifteenSecondEnd = fifteenSecondStart + 15000;
const timeToWait = Math.max(fifteenSecondEnd - now, 0) + 200;
const bufferForTimeDrift = TWO_SECONDS;
const timeToWait = Math.max(fifteenSecondEnd - now, 0) + bufferForTimeDrift;
await sleep(timeToWait);
};
const calculatePrice = (
Expand Down

0 comments on commit 0bf65f6

Please sign in to comment.