-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
TestDNSResolver/cache is flaky on windows #1974
Comments
Closed
imiric
pushed a commit
that referenced
this issue
May 23, 2023
This should hopefully be more reliable, and avoid the flakiness we've seen on Windows[1], even after #1974: scheduler_ext_test.go:1130: Error Trace: D:/a/k6/k6/execution/scheduler_ext_test.go:1130 Error: Should be true Test: TestDNSResolver/cache/3s Messages: expected error to contain one of the list of messages It doesn't get rid of the reliance on timings, but since the way we check DNS TTL also relies on time, we can't easily avoid it. Maybe by switching to the MiniRunner instead of js.Runner we could avoid the sleep() in the script, but the value of this test is also calling the k6/http module directly, so it's closer to a real world script.
imiric
pushed a commit
that referenced
this issue
May 23, 2023
This should hopefully be more reliable, and avoid the flakiness we've seen on Windows[1], even after #1974: scheduler_ext_test.go:1130: Error Trace: D:/a/k6/k6/execution/scheduler_ext_test.go:1130 Error: Should be true Test: TestDNSResolver/cache/3s Messages: expected error to contain one of the list of messages It doesn't get rid of the reliance on timings, but since the way we check DNS TTL also relies on time, we can't easily avoid it. Maybe by switching to the MiniRunner instead of js.Runner we could avoid the sleep() in the script, but the value of this test is also calling the k6/http module directly, so it's closer to a real world script. [1]: https://github.com/grafana/k6/actions/runs/5047828671/jobs/9071063454
imiric
pushed a commit
that referenced
this issue
May 23, 2023
This should hopefully be more reliable, and avoid the flakiness we've seen on Windows[1], even after #1974: scheduler_ext_test.go:1130: Error Trace: D:/a/k6/k6/execution/scheduler_ext_test.go:1130 Error: Should be true Test: TestDNSResolver/cache/3s Messages: expected error to contain one of the list of messages It doesn't get rid of the reliance on timings, but since the way we check DNS TTL also relies on time, we can't easily avoid it. Maybe by switching to the MiniRunner instead of js.Runner we could avoid the sleep() in the script, but the value of this test is also calling the k6/http module directly, so it's closer to a real world script. [1]: https://github.com/grafana/k6/actions/runs/5047828671/jobs/9071063454
imiric
pushed a commit
that referenced
this issue
May 24, 2023
Instead of relying on log messages, this hooks into the DNS resolver, and tracks how many times a resolution attempt was made after that. This should be more reliable, and avoid the recent flakiness we've seen with this test on Windows[1], even after #1974: scheduler_ext_test.go:1130: Error Trace: D:/a/k6/k6/execution/scheduler_ext_test.go:1130 Error: Should be true Test: TestDNSResolver/cache/3s Messages: expected error to contain one of the list of messages [1]: https://github.com/grafana/k6/actions/runs/5047828671/jobs/9071063454
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/k6io/k6/runs/2362979683?check_suite_focus=true
The text was updated successfully, but these errors were encountered: