From b6faebc422b4b2384ed7f6d061d5c316092adb52 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Thu, 17 Nov 2022 11:05:55 +1100 Subject: [PATCH] test: fix flaky test --- packages/tests/tests/store.node.spec.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/tests/tests/store.node.spec.ts b/packages/tests/tests/store.node.spec.ts index 5f17d30616..ee78ac4e6e 100644 --- a/packages/tests/tests/store.node.spec.ts +++ b/packages/tests/tests/store.node.spec.ts @@ -18,6 +18,7 @@ import { expect } from "chai"; import debug from "debug"; import { makeLogFileName, NOISE_KEY_1, NOISE_KEY_2, Nwaku } from "../src"; +import { delay } from "../src/delay"; const log = debug("waku:test:store"); @@ -204,6 +205,7 @@ describe("Waku Store", () => { }) ) ).to.be.true; + await delay(1); // to ensure each timestamp is unique. } waku = await createFullNode({ @@ -242,6 +244,7 @@ describe("Waku Store", () => { }) ) ).to.be.true; + await delay(1); // to ensure each timestamp is unique. } waku = await createFullNode({ @@ -599,6 +602,7 @@ describe("Waku Store", () => { }) ) ).to.be.true; + await delay(1); // to ensure each timestamp is unique. } waku = await createFullNode({