Skip to content

Commit 8ca027c

Browse files
committed
Tweak test timing to fix flakes
1 parent a34abff commit 8ca027c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/toolkit/src/query/tests/optimisticUpserts.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const api = createApi({
8686
// and leave a side effect we can check in the test
8787
api.dispatch(postAddedAction(res.data.id))
8888
},
89-
keepUnusedDataFor: 0.01,
89+
keepUnusedDataFor: 0.1,
9090
}),
9191
getFolder: build.query<FolderT, number>({
9292
queryFn: async (args) => {
@@ -430,12 +430,12 @@ describe('upsertQueryEntries', () => {
430430

431431
expect(selectedData).toBe(posts[0])
432432
},
433-
{ timeout: 50, interval: 5 },
433+
{ timeout: 150, interval: 5 },
434434
)
435435

436436
// The cache data should be removed after the keepUnusedDataFor time,
437437
// so wait longer than that
438-
await delay(100)
438+
await delay(300)
439439

440440
const stateAfter = storeRef.store.getState()
441441

0 commit comments

Comments
 (0)