Skip to content

test(flagd): Reduce flakiness of ChannelConnectorTest by using random port #1513

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

Conversation

aepfli
Copy link
Member

@aepfli aepfli commented Jul 14, 2025

The ChannelConnectorTests were flaky on GitHub actions, as they always used 8080 for their tests. With this change, we will use a random port for each test run.

Theoretically, the same port could still be assigned, but the chance would be much smaller than the fixed port.

How to test?

Start any software that will use port 8080 (e.g., a Docker web server) and run the test. It should pass without any issues.

docker run \
  --rm -it \
  -p 8080:8080 \
  ghcr.io/open-feature/flagd-testbed

If you run the same on main, the unit test will fail.

… port

The ChannelConnectorTests was flacky on github actions, as it used 8080
all the time for its test. With this change we will use a random port
for each test run.

Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
@aepfli aepfli enabled auto-merge (squash) July 14, 2025 14:34
@aepfli aepfli merged commit aeb1c82 into open-feature:main Jul 14, 2025
5 checks passed
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.

7 participants