Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yet another test stability improvements PR #4397

Merged

Conversation

zorzysty
Copy link
Collaborator

No description provided.

@zorzysty zorzysty force-pushed the yet_another_test_stabilization_improvements branch from 08f1b3a to 52da440 Compare October 28, 2022 10:38
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 08f1b3a:

Sandbox Source
@tanstack/query-example-react-basic-typescript Configuration
@tanstack/query-example-solid-basic-typescript Configuration
@tanstack/query-example-vue-basic Configuration

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 28, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 964147c:

Sandbox Source
@tanstack/query-example-react-basic-typescript Configuration
@tanstack/query-example-solid-basic-typescript Configuration
@tanstack/query-example-vue-basic Configuration

@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2022

Codecov Report

Base: 96.36% // Head: 92.27% // Decreases project coverage by -4.08% ⚠️

Coverage data is based on head (964147c) compared to base (eab6e2c).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4397      +/-   ##
==========================================
- Coverage   96.36%   92.27%   -4.09%     
==========================================
  Files          45       87      +42     
  Lines        2281     3561    +1280     
  Branches      640      902     +262     
==========================================
+ Hits         2198     3286    +1088     
- Misses         80      259     +179     
- Partials        3       16      +13     
Impacted Files Coverage Δ
src/react/setLogger.ts
src/react/useInfiniteQuery.ts
src/core/infiniteQueryObserver.ts
src/react/QueryClientProvider.tsx
src/devtools/useMediaQuery.ts
src/core/onlineManager.ts
src/react/utils.ts
src/core/mutationCache.ts
src/react/QueryErrorResetBoundary.tsx
src/devtools/styledComponents.ts
... and 122 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

})

fireEvent.click(rendered.getByRole('button', { name: 'remove' }))

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here we need a longer sleep (100) after the button click. As the title suggests:

'should not get into an infinite loop when removing a query with cacheTime 0 and rerendering'

How do we detect an infinite loop? We wait a bit and wait what the states length is. If it's still 5 after 100ms, it's not an infinite loop. If it were, it would be anywhere between 30 and 50 or so :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zorzysty zorzysty changed the title Yet another test stabilization improvements PR Yet another test stability improvements PR Oct 29, 2022
@TkDodo TkDodo merged commit 1fe9356 into TanStack:main Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants