-
Notifications
You must be signed in to change notification settings - Fork 278
tests: localhost name lookup takes 1sec on Windows in github actions #1257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
sechkova
added a commit
to sechkova/tuf
that referenced
this issue
Jan 18, 2021
On Windows (Github Actions) the lookup for 'localhost' takes 1 second. This is because: - Windows retries connect() with a timeout - the machine has IPv6 and IPv4 but Testserver only binds the port on IPv4 - the test clients connect to 'localhost' Since socketserver.TCPServer does not seem to support IPv6 before 3.8, just replace 'localhost' with '127.0.0.1' in client-side URLs. See theupdateframework#1257 Signed-off-by: Teodora Sechkova <[email protected]>
sechkova
added a commit
to sechkova/tuf
that referenced
this issue
Jan 22, 2021
On Windows (Github Actions) the lookup for 'localhost' takes 1 second. This is because: - Windows retries connect() with a timeout - the machine has IPv6 and IPv4 but Testserver only binds the port on IPv4 - the test clients connect to 'localhost' Since socketserver.TCPServer does not seem to support IPv6 before 3.8, just replace 'localhost' with '127.0.0.1' in client-side URLs. See theupdateframework#1257 Signed-off-by: Teodora Sechkova <[email protected]>
sechkova
added a commit
to sechkova/tuf
that referenced
this issue
Jan 22, 2021
On Windows (Github Actions) the lookup for 'localhost' takes 1 second. This is because: - Windows retries connect() with a timeout - the machine has IPv6 and IPv4 but Testserver only binds the port on IPv4 - the test clients connect to 'localhost' Since socketserver.TCPServer does not seem to support IPv6 before 3.8, just replace 'localhost' with '127.0.0.1' in client-side URLs. See theupdateframework#1257 Signed-off-by: Teodora Sechkova <[email protected]>
sechkova
added a commit
to sechkova/tuf
that referenced
this issue
Jan 22, 2021
On Windows (Github Actions) the lookup for 'localhost' takes 1 second. This is because: - Windows retries connect() with a timeout - the machine has IPv6 and IPv4 but Testserver only binds the port on IPv4 - the test clients connect to 'localhost' Since socketserver.TCPServer does not seem to support IPv6 before 3.8, just replace 'localhost' with '127.0.0.1' in client-side URLs. See theupdateframework#1257 Signed-off-by: Teodora Sechkova <[email protected]>
sechkova
added a commit
to sechkova/tuf
that referenced
this issue
Feb 10, 2021
On Windows (Github Actions) the lookup for 'localhost' takes 1 second. This is because: - Windows retries connect() with a timeout - the machine has IPv6 and IPv4 but Testserver only binds the port on IPv4 - the test clients connect to 'localhost' Since socketserver.TCPServer does not seem to support IPv6 before 3.8, just replace 'localhost' with '127.0.0.1' in client-side URLs. See theupdateframework#1257 Signed-off-by: Teodora Sechkova <[email protected]>
sechkova
added a commit
to sechkova/tuf
that referenced
this issue
Feb 16, 2021
On Windows (Github Actions) the lookup for 'localhost' takes 1 second. This is because: - Windows retries connect() with a timeout - the machine has IPv6 and IPv4 but Testserver only binds the port on IPv4 - the test clients connect to 'localhost' Since socketserver.TCPServer does not seem to support IPv6 before 3.8, just replace 'localhost' with '127.0.0.1' in client-side URLs. See theupdateframework#1257 Signed-off-by: Teodora Sechkova <[email protected]>
sechkova
added a commit
to sechkova/tuf
that referenced
this issue
Feb 23, 2021
On Windows (Github Actions) the lookup for 'localhost' takes 1 second. This is because: - Windows retries connect() with a timeout - the machine has IPv6 and IPv4 but Testserver only binds the port on IPv4 - the test clients connect to 'localhost' Since socketserver.TCPServer does not seem to support IPv6 before 3.8, just replace 'localhost' with '127.0.0.1' in client-side URLs. See theupdateframework#1257 Signed-off-by: Teodora Sechkova <[email protected]>
last windows builds are >2 minutes faster 👍 👍 thanks @sechkova |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was found in PR #1250: on windows (Github Actions) the lookup for localhost takes 1 second.
This is because:
This combination leads to every test first spending 1 second trying to connect to localhost on IPv6 (this fails because the server is only IPv4). Eventually connect() succeeds on IPv4.
I would be nice if we could have the test servers bind the port on both IPv4 and IPv6 but unfortunately socketserver.TCPServer does not seem to support IPv6 before 3.8. This works on later versions:
I think the correct choice at the moment is to just use "127.0.0.1" instead of "localhost" in the tests (clients) -- this should mean we don't waste time trying IPv6. Maybe Teodora wants to fix this there but I'm filing this so we don't lose track.
The text was updated successfully, but these errors were encountered: