Skip to content
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

Attempt to fix occasional CI client/server test flakes. #343

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

cpu
Copy link
Member

@cpu cpu commented Aug 16, 2023

Description

This branch attempts to resolve #336. I say "attempts" because I've had little luck trying to force the flake to happen in CI (even when hacking up the build tasks to just run multiple instances of the Windows/MacOS tests that seem to catch the flake most often).

I think this is the most obvious reason why we'd see the flakes we see, but it's hard to say conclusively :-)

tests: fix wait_tcp_port format string.

The success-case print for the wait_tcp_port helper wasn't formatting its message as an f-string, instead printing the literal {host} and {port} placeholders.

tests: wait for tcp port for all test types.

The run_mtls_client_tests and run_mtls_client_crl_tests were being run without calling wait_tcp_port first. I suspect this is the reason we sometimes see the connect tests fail in CI on some platforms with output about the connection being refused.

The success-case `print` for the `wait_tcp_port` helper wasn't
formatting its message as an f-string, instead printing the literal
`{host}` and `{port}` placeholders.
The `run_mtls_client_tests` and `run_mtls_client_crl_tests` were being
run without calling `wait_tcp_port` first. I suspect this is the reason
we sometimes see the connect tests fail in CI on some platforms with
output about the connection being refused.
Copy link
Collaborator

@jsha jsha left a comment

Choose a reason for hiding this comment

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

This looks good, thanks!

Based on #337 (comment), I suspect we may also wind up needing to randomize port number on a per-testcase basis.

@cpu cpu merged commit 40ea994 into rustls:main Aug 16, 2023
21 checks passed
@cpu cpu deleted the cpu-try-fix-connect-flakes branch August 16, 2023 16:46
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.

connect tests flaky?
2 participants