From de99dd42a2d59c3d47a9ebc5fe03a098d34ec86f Mon Sep 17 00:00:00 2001 From: Bernard Niset Date: Wed, 6 Aug 2025 22:30:31 +0200 Subject: [PATCH] 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 --- Tests/LibWeb/TestConfig.ini | 4 ---- Tests/LibWeb/Text/input/include.js | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Tests/LibWeb/TestConfig.ini b/Tests/LibWeb/TestConfig.ini index 808565bb7db..ceaadd570d0 100644 --- a/Tests/LibWeb/TestConfig.ini +++ b/Tests/LibWeb/TestConfig.ini @@ -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 diff --git a/Tests/LibWeb/Text/input/include.js b/Tests/LibWeb/Text/input/include.js index 7c81f80506a..dc09af17be6 100644 --- a/Tests/LibWeb/Text/input/include.js +++ b/Tests/LibWeb/Text/input/include.js @@ -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; })();