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

Fix test master selection and tests with timings issues for topics #183

Merged
merged 3 commits into from
Mar 24, 2021

Conversation

hackaugusto
Copy link
Contributor

@hackaugusto hackaugusto commented Mar 23, 2021

Depends on #180

The test for master selection couldn't be run in parallel because the port numbers, group ids, and clients ids conflicted. This changes the test to use random values fixing the flakiness.

I tested this with:

(cd containers; sudo docker-compose --project-name karapace up -d)
while [[ $? == 0 ]]; do pytest tests -vvv -x --registry-url http://localhost:8081 --rest-url http://localhost:8082/ --kafka-bootstrap-servers localhost:9092 -k test_master_selection; done

@hackaugusto hackaugusto changed the title Fix test master selection Fix test master selection and tests with timmings issues for topics Mar 23, 2021
@hackaugusto hackaugusto force-pushed the hacka-fix-test-master-selection branch from e83c2f2 to 10c7370 Compare March 24, 2021 08:46
@tvainika tvainika changed the title Fix test master selection and tests with timmings issues for topics Fix test master selection and tests with timings issues for topics Mar 24, 2021
@tvainika
Copy link
Contributor

FAILED tests/integration/test_master_coordinator.py::test_master_selection[lowest] was only failed test, supposed to be fixed by this PR, but apparently not

Augusto F. Hack added 3 commits March 24, 2021 10:20
Fixes test_master_selection so that it can ran in parallel. For it to
work properly random ports, group_ids, and client_ids are used to
prevent conflicts.
When executing tests with a Kafka broker in a docker container it takes
some additional time for the Rest/Registry servers to synchronize, that
caused flakiness.

The flakiness issues were fixed with a polling tool that waits until the
new topic is seen.
when executing tests against container services it takes a bit more of
time for the services to synchronize. This adds polling for APIs calls
that would may fail on the first try because of these timming issues.
@hackaugusto hackaugusto force-pushed the hacka-fix-test-master-selection branch from 10c7370 to e1bbfc1 Compare March 24, 2021 09:21
@tvainika tvainika merged commit b3ac1ca into master Mar 24, 2021
@tvainika tvainika deleted the hacka-fix-test-master-selection branch March 24, 2021 10:39
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