-
Notifications
You must be signed in to change notification settings - Fork 148
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
[Flaky Test] Fix TestHTTPSProxy #5878
[Flaky Test] Fix TestHTTPSProxy #5878
Conversation
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
From what I understood, it should close the flaky test issue right? |
My bad, I fixed it |
Quality Gate passedIssues Measures |
(cherry picked from commit 02fb75e) # Conflicts: # testing/proxytest/proxytest_test.go
(cherry picked from commit 02fb75e) # Conflicts: # testing/proxytest/proxytest_test.go
(cherry picked from commit 02fb75e) # Conflicts: # testing/proxytest/proxytest_test.go
(cherry picked from commit 02fb75e) # Conflicts: # testing/proxytest/proxytest_test.go
(cherry picked from commit 02fb75e)
(cherry picked from commit 02fb75e)
(cherry picked from commit 02fb75e)
(cherry picked from commit 02fb75e)
(cherry picked from commit 02fb75e) Co-authored-by: Anderson Queiroz <[email protected]>
(cherry picked from commit 02fb75e) --------- Co-authored-by: Anderson Queiroz <[email protected]>
… closing the server (#5970) * (backport #5878) proxytest: fix log after test finished (#5878) (cherry picked from commit 02fb75e) --------- Co-authored-by: Anderson Queiroz <[email protected]> * (backport #5950) [proxytest] Await requests before server shutdown #5970 (cherry picked from commit e423d73) --------- Co-authored-by: Anderson Queiroz <[email protected]>
What does this PR do?
It moves the close of the proxy and target http server to
t.Cleanup()
Why is it important?
Just using
defer
was causing the last request log to be logged after the test had ended, what lead to a panic.Checklist
[ ] I have commented my code, particularly in hard-to-understand areas[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added tests that prove my fix is effective or that my feature works[ ] I have added an entry in./changelog/fragments
using the changelog tool[ ] I have added an integration test or an E2E testDisruptive User Impact
How to test this PR locally
On a Mac (the panics happened on Mac)
It should succeed
Related issues
Questions to ask yourself