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

t: Prevent use of occupied port in all full-stack/scalability tests #3134

Closed
wants to merge 1 commit into from

Conversation

okurz
Copy link
Member

@okurz okurz commented May 29, 2020

Sporadically tests can fail with "Connection refused" when already
occupied ports have been selected for services in tests as we only
looked for a single free port and tried to use the ports next to it
without checking if they are actually free.

This commit is inspired from the idea in the scalability test extended
to all services and used in all relevant full-stack and scalability
tests. By mocking the function "service_port" from OpenQA::Utils
whenever the new function "mock_service_ports" is called we can provide
a consistent but dynamically defined set of ports that should all be
free to use during the course of each test.

Related progress issue: https://progress.opensuse.org/issues/59043

Sporadically tests can fail with "Connection refused" when already
occupied ports have been selected for services in tests as we only
looked for a single free port and tried to use the ports next to it
without checking if they are actually free.

This commit is inspired from the idea in the scalability test extended
to all services and used in all relevant full-stack and scalability
tests. By mocking the function "service_port" from OpenQA::Utils
whenever the new function "mock_service_ports" is called we can provide
a consistent but dynamically defined set of ports that should all be
free to use during the course of each test.

Related progress issue: https://progress.opensuse.org/issues/59043
@okurz okurz closed this Jun 2, 2020
@okurz okurz deleted the feature/test_ports branch June 2, 2020 12:00
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.

None yet

1 participant