Skip to content

Commit

Permalink
Fix flaky test set for more margine for ttl (valkey-io#3087)
Browse files Browse the repository at this point in the history
Signed-off-by: Avi Fenesh <[email protected]>
  • Loading branch information
avifenesh authored Feb 6, 2025
1 parent 59ee8c1 commit 6a98816
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node/tests/SharedTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8108,7 +8108,7 @@ export function runBaseTests(config: {
const setWithUnixSec = await client.set(key, value, {
expiry: {
type: TimeUnit.UnixSeconds,
count: Math.floor(Date.now() / 1000) + 1,
count: Math.floor(Date.now() / 1000) + 2,
},
});
expect(setWithUnixSec).toEqual("OK");
Expand All @@ -8122,7 +8122,7 @@ export function runBaseTests(config: {
const getResWithExpiryKeep = await client.get(key);
expect(getResWithExpiryKeep).toEqual(value);
// wait for the key to expire base on the previous set
let sleep = new Promise((resolve) => setTimeout(resolve, 1000));
let sleep = new Promise((resolve) => setTimeout(resolve, 2000));
await sleep;
const getResExpire = await client.get(key);
// key should have expired
Expand Down

0 comments on commit 6a98816

Please sign in to comment.