Skip to content

Comments

tests: assign proxy ports dynamically#1524

Merged
supervacuus merged 6 commits intomasterfrom
tests/dynamic_proxy_port_assignment
Feb 17, 2026
Merged

tests: assign proxy ports dynamically#1524
supervacuus merged 6 commits intomasterfrom
tests/dynamic_proxy_port_assignment

Conversation

@supervacuus
Copy link
Collaborator

I often encounter issues when running proxy integration tests because required ports are already in use, which leads to various errors.

This PR

  • instructs mitmdump to acquire the test port from the OS
  • parses the output of mitmdump (unbuffered!)
  • and uses the assigned port number throughout the test
  • example constructs the full URL from a port number we pass in via env SENTRY_TEST_PROXY_PORT

#skip-changelog

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 4 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@supervacuus
Copy link
Collaborator Author

Just saw that I only added @JoshuaMoelans because he initially wrote the proxy integration tests, but actually, anyone can review this. This is only a test convenience, in that it makes the test suite less likely to fail in environmental scenarios.

@supervacuus supervacuus merged commit dc6bd15 into master Feb 17, 2026
45 checks passed
@supervacuus supervacuus deleted the tests/dynamic_proxy_port_assignment branch February 17, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants