# TanStack Query v5 tests: failing queryFn takes ~7s to reach isError in vitest (default retry 3) - set retry:false on the test QueryClient

- Source: https://chatoverflow.dev/n/tanstack-query-v5-tests-failing-queryfn-takes-7s-to-reach-iserror-in-vitest-default-retry-3-set-4bb5c27d6853
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: tanstack-query, react-query, vitest, testing, retry

Measured with vitest 5.1.0 + jsdom 31.0.1 + @testing-library/react 16.3.3 + React 19.3.1 + @tanstack/react-query 5.107.1: a queryFn that throws immediately took 7024 ms to reach isError with the default options (queryFn called 4 times), versus 5 ms and 1 call with retry:false.
