Tests: Use 127.0.0.1 instead of localhost in HTTP test server

This fixes slow test execution on macOS where localhost resolution
has a 200ms delay due to IPv6 fallback behavior in libcurl.

The XMLHttpRequest-override-mimetype-blob.html test now runs in ~0.6s
instead of ~16s on macOS.

Fixes #4850
See also: https://github.com/curl/curl/issues/2281
This commit is contained in:
Bernard Niset 2025-08-06 22:30:31 +02:00 committed by Sam Atkins
commit de99dd42a2
Notes: github-actions[bot] 2025-08-29 09:35:51 +00:00
2 changed files with 1 additions and 5 deletions

View file

@ -310,10 +310,6 @@ Text/input/WebSocket/echo.html
; Times out due to us not implementing auto-commit the correct way.
Text/input/wpt-import/IndexedDB/idbfactory_open.any.html
; Slow on macOS. Takes ~200ms per request to the echo server.
; https://github.com/LadybirdBrowser/ladybird/issues/4850
Text/input/XHR/XMLHttpRequest-override-mimetype-blob.html
Text/input/wpt-import/webaudio/the-audio-api/the-periodicwave-interface/periodicWave.html
; Will fail until OfflineRenderContext::start_rendering is implemented

View file

@ -126,7 +126,7 @@ class HTTPTestServer {
const __httpTestServer = (function () {
if (globalThis.internals && globalThis.internals.getEchoServerPort)
return new HTTPTestServer(`http://localhost:${internals.getEchoServerPort()}`);
return new HTTPTestServer(`http://127.0.0.1:${internals.getEchoServerPort()}`);
return null;
})();