Skip to content

Commit 9923dd3

Browse files
github-actions[bot]Repo AssistCopilot
authored
[Repo Assist] Fix Windows CI: use 127.0.0.1 instead of localhost for test HTTP servers (#1648)
* Fix Windows CI: use 127.0.0.1 instead of localhost for test HTTP servers On Windows GitHub Actions runners, binding Kestrel to 'localhost' fails because it attempts to bind to both 127.0.0.1 (IPv4) and ::1 (IPv6), and IPv6 socket creation is forbidden (SocketException 10013: WSAEACCES). Using '127.0.0.1' explicitly avoids the IPv6 bind attempt and makes the tests reliable on Windows CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ci: trigger CI checks --------- Co-authored-by: Repo Assist <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 9b5aace commit 9923dd3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/FSharp.Data.Core.Tests/Http.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ let startHttpLocalServer() =
5757
port <- random.Next(10000, 65000)
5858
port
5959

60-
let baseAddress = $"http://localhost:{freePort}"
60+
let baseAddress = $"http://127.0.0.1:{freePort}"
6161

6262
let workerTask = app.RunAsync(baseAddress)
6363
printfn $"Started local http server with address {baseAddress}"

tests/FSharp.Data.Core.Tests/XmlExtensions.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ let startXmlHttpLocalServer() =
6060
port <- random.Next(10000, 65000)
6161
port
6262

63-
let baseAddress = $"http://localhost:{freePort}"
63+
let baseAddress = $"http://127.0.0.1:{freePort}"
6464
let workerTask = app.RunAsync(baseAddress)
6565

6666
{ new ITestHttpServer with

0 commit comments

Comments
 (0)