next.js
299e1ff3 - Remove revalidation settling period from router-act (#90531)

Commit
3 days ago
Remove revalidation settling period from router-act (#90531) The 500ms settling period in router-act's `act()` polled for 500ms after the request queue emptied before exiting. This was added to accommodate the 300ms revalidation cooldown in the client router — after a server action calls `revalidatePath`/`revalidateTag`, the client delays re-prefetching for 300ms. The settling period ensured `act()` waited long enough to catch the resulting re-prefetch. The settling period applied to every `act()` call, not just ones involving revalidation, adding ~500ms per call across 28 test files. Remove it entirely and instead use Playwright's fake clock (`page.clock.install` / `page.clock.fastForward`) in the revalidation tests to deterministically control the cooldown. This is both faster and architecturally cleaner — the test utility no longer embeds knowledge of a specific client-side timer.
Author
Parents
Loading