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

[DO NOT MERGE - wait 8.16 release][8.16](backport #5878) [Flaky Test] Fix TestHTTPSProxy #5901

Draft
wants to merge 2 commits into
base: 8.16
Choose a base branch
from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 31, 2024

needs #5928 to be merged first

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

  • My code follows the style guidelines of this project
  • [ ] 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 test

Disruptive User Impact

  • N/A

How to test this PR locally

On a Mac (the panics happened on Mac)

go test -count 10000 -timeout 0 -run TestHTTPSProxy ./testing/proxytest/

It should succeed

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

This is an automatic backport of pull request #5878 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team as a code owner October 31, 2024 13:16
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Oct 31, 2024
@mergify mergify bot requested review from blakerouse and kaanyalti and removed request for a team October 31, 2024 13:16
Copy link
Contributor Author

mergify bot commented Oct 31, 2024

Cherry-pick of 02fb75e has failed:

On branch mergify/bp/8.16/pr-5878
Your branch is up to date with 'origin/8.16'.

You are currently cherry-picking commit 02fb75e59e.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   testing/proxytest/proxytest_test.go

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Oct 31, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@pierrehilbert pierrehilbert requested review from AndersonQ and removed request for blakerouse and kaanyalti October 31, 2024 13:36
(cherry picked from commit 02fb75e)

# Conflicts:
#	testing/proxytest/proxytest_test.go
@AndersonQ AndersonQ changed the title [8.16](backport #5878) [Flaky Test] Fix TestHTTPSProxy [DONOT MERGE - wait 8.16 release][8.16](backport #5878) [Flaky Test] Fix TestHTTPSProxy Oct 31, 2024
@AndersonQ AndersonQ changed the title [DONOT MERGE - wait 8.16 release][8.16](backport #5878) [Flaky Test] Fix TestHTTPSProxy [DO NOT MERGE - wait 8.16 release][8.16](backport #5878) [Flaky Test] Fix TestHTTPSProxy Oct 31, 2024
@AndersonQ AndersonQ removed the conflicts There is a conflict in the backported pull request label Nov 1, 2024
Copy link

Copy link
Contributor Author

mergify bot commented Nov 4, 2024

This pull request has not been merged yet. Could you please review and merge it @AndersonQ? 🙏

@AndersonQ AndersonQ marked this pull request as draft November 7, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants