Skip to content

test: wait for cache test server to listen#5242

Merged
metcoder95 merged 1 commit intonodejs:mainfrom
trivikr:test-cache-interceptor-server-listen
May 6, 2026
Merged

test: wait for cache test server to listen#5242
metcoder95 merged 1 commit intonodejs:mainfrom
trivikr:test-cache-interceptor-server-listen

Conversation

@trivikr
Copy link
Copy Markdown
Member

@trivikr trivikr commented May 6, 2026

This relates to...

Fixes: #5199

Rationale

The cache test worker imports the upstream cache-tests server fixture, but that fixture can finish module evaluation before the server is actually listening. Until the upstream fixture exposes or awaits server readiness, the worker should wait for the configured BASE_URL to accept connections before running the suite.

Changes

  • Wait for the cache test server to listen before starting the cache test suite.
  • Add a TODO linking the upstream cache-tests issue so this workaround can be removed once fixed upstream.

Features

N/A

Bug Fixes

N/A

Breaking Changes and Deprecations

N/A

Status

Assisted-by: openai:gpt-5.5

Assisted-by: openai:gpt-5.5
Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.27%. Comparing base (4f8f814) to head (de44170).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5242   +/-   ##
=======================================
  Coverage   93.27%   93.27%           
=======================================
  Files         110      110           
  Lines       36366    36366           
=======================================
  Hits        33922    33922           
  Misses       2444     2444           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@metcoder95 metcoder95 merged commit 2b0d4c9 into nodejs:main May 6, 2026
35 checks passed
@trivikr trivikr deleted the test-cache-interceptor-server-listen branch May 6, 2026 21:22
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.

[flaky] test/cache-interceptor/cache-tests.mjs

4 participants