-
Notifications
You must be signed in to change notification settings - Fork 353
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
proxy: fix flaky TestSlowService #2528
Merged
AlexanderYastrebov
merged 1 commit into
master
from
proxy/fix-flaky-backendtimeout-test
Aug 21, 2023
Merged
proxy: fix flaky TestSlowService #2528
AlexanderYastrebov
merged 1 commit into
master
from
proxy/fix-flaky-backendtimeout-test
Aug 21, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
c3a6ed6
to
d73cb90
Compare
d73cb90
to
7c89681
Compare
Make it 1ms->100ms Think about the computer that runs tests as the cheapest computer you can built. It runs as a shared machine that will be on average at >80% load or more. |
backendTimeout("1ms") in TestSlowService may cancel context during dialing which results in `i/o timeout` error and 502 response status ``` $ go test ./proxy -run=TestSlowService -count=10000 | grep -F 'FAIL:' -C1 ... time="2023-08-18T20:50:57+02:00" level=error msg="error while proxying after 1.295026ms, route with backend network http://127.0.0.1:38613, status code 502: dialing failed true: failed to do backend roundtrip to 127.0.0.1:38613: dial tcp 127.0.0.1:38613: i/o timeout, remote host: 127.0.0.1, request: \"GET / HTTP/1.1\", host: 127.0.0.1:36801, user agent: \"Go-http-client/1.1\"" --- FAIL: TestSlowService (0.00s) backendtimeout_test.go:40: expected 504, got: &{502 Bad Gateway 502 HTTP/1.1 1 1 map[Content-Length:[12] Content-Type:[text/plain; charset=utf-8] Date:[Fri, 18 Aug 2023 18:50:57 GMT] Server:[Skipper] X-Content-Type-Options:[nosniff]] 0xc00068e100 12 [] false false map[] 0xc000255600 <nil>} ``` Increase TestSlowService filter parameter to 10ms. Also make requests using test proxy client. Signed-off-by: Alexander Yastrebov <[email protected]>
check-race:
|
7c89681
to
c3e6788
Compare
Other tests use x*10ms timeouts and I only saw this test flaking so far. I propose we merge this fix and maybe rethink the whole file if the problem re-appears. |
👍 |
1 similar comment
👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
backendTimeout("1ms") in TestSlowService may cancel context during
dialing which results in
i/o timeout
error and 502 response statusIncrease TestSlowService filter parameter to 10ms.
Also make requests using test proxy client.