Skip to content

fix: deflake cache-fastimers-fix.js - #4491

Merged
Uzlopak merged 1 commit into
mainfrom
deflake-test-cache-fastimers-fix.js
Aug 31, 2025
Merged

Uzlopak merged 1 commit into
mainfrom
deflake-test-cache-fastimers-fix.js

Conversation

@Uzlopak

@Uzlopak Uzlopak commented Aug 31, 2025 •

Copy link
Copy Markdown
Contributor

This fixes the flakyness of test/interceptors/cache-fastimers-fix.js and renames the filename to a more descriptive name cache-revalidate-statel.js. Also "fastimers" is a clear typo.

The flakyness was due to the fact, that the http-server by nodejs is sending the date header, which is not overridable by modifying the global Date and/or Timer Logic. I guess node core also caches the date and refreshes it every second and not on every http request?! That resulted in the flakyness, we saw.

I basically deactivated sending the date header via the http server and send my own mocked date header t. Thus making it fully deterministic.

This relates to...

Rationale

Changes

Features

Bug Fixes

Breaking Changes and Deprecations

Status

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@Uzlopak
Uzlopak merged commit d47e179 into main Aug 31, 2025
@Uzlopak
Uzlopak deleted the deflake-test-cache-fastimers-fix.js branch August 31, 2025 08:32
@github-actions github-actions Bot mentioned this pull request Sep 9, 2025
slagiewka pushed a commit to slagiewka/undici that referenced this pull request Feb 14, 2026
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.

2 participants