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

Unit tests intermittently fails #939

Open
swermin opened this issue May 1, 2024 · 1 comment
Open

Unit tests intermittently fails #939

swermin opened this issue May 1, 2024 · 1 comment
Labels
kind/bug Something isn't working

Comments

@swermin
Copy link
Contributor

swermin commented May 1, 2024

What happened:
When running the tests the quilkin/test/tests/proxy.rs failed 1 out 5 runs, giving of false positives.

What you expected to happen:
The tests to pass every time (unless code changes are making it fail)

How to reproduce it (as minimally and precisely as possible):
run cargo test --package qt --test proxy #-- --show-output

Anything else we need to know?:
From our investigation it seems like the two tests server and recv_from aren't playing nicely. If server tests are removed then all the tests are passing every time.
From further investigation it seems like the proxy session socket reuse is taking longer than expected to return so it makes the recv_from to fail sometimes. Bumping the timeout from 20 to 100 seems to solve the issue. quilkin/test/tests/proxy.rs:202 -> sb.timeout(20, packet_rx.recv())
(See logs)

Environment:

  • Quilkin version: latest main branch
  • Execution environment (binary, container, etc): locally
  • Operating system: WSL Ubuntu
  • Custom filters? (Yes/No - if so, what do they do?): No
  • Log(s):
2024-05-01T08:16:10.555749Z TRACE receiver{id=0}: quilkin::components::proxy::sessions: creating new socket for session source=[::1]:58986 dest=[::1]:40768
2024-05-01T08:16:10.575751Z  WARN proxy: Failed to connect (debug trace to find issue why test fails)
2024-05-01T08:16:10.614929Z TRACE receiver{id=0}: quilkin::components::proxy::sessions: reusing socket for session source=[::1]:58986 dest=[::1]:40768
  • Others:
@swermin swermin added the kind/bug Something isn't working label May 1, 2024
@markmandel
Copy link
Member

Personally, I'm quite happy for larger timeouts in unit tests - it's a failure state, so if it fails in 20ms or 1s, it's really not that much different.

Fast success state is where I would optimise for - so happy to take a PR on this 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants