Skip to content

Commit 68e29dd

Browse files
authored
de-flake tests (apollographql#12315)
1 parent 45120e8 commit 68e29dd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/react/hooks/__tests__/useBackgroundQuery.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ it("will resubscribe after disposed when mounting useReadQuery", async () => {
339339
}
340340

341341
// Wait long enough for auto dispose to kick in
342-
await wait(50);
342+
await wait(80);
343343

344344
expect(client.getObservableQueries().size).toBe(0);
345345
expect(client).not.toHaveSuspenseCacheEntryUsing(query);

src/react/hooks/__tests__/useQuery.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2916,7 +2916,7 @@ describe("useQuery Hook", () => {
29162916
const { takeSnapshot, unmount } = await renderHookToSnapshotStream(
29172917
() =>
29182918
useQuery(query, {
2919-
pollInterval: 10,
2919+
pollInterval: 25,
29202920
fetchPolicy: "cache-and-network",
29212921
}),
29222922
{
@@ -2955,7 +2955,7 @@ describe("useQuery Hook", () => {
29552955
expect(requestSpy).toHaveBeenCalledTimes(1);
29562956
}
29572957

2958-
await wait(10);
2958+
await wait(25);
29592959

29602960
{
29612961
const result = await takeSnapshot();

0 commit comments

Comments
 (0)