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: Use contextmanager for process creation in tests #534

Closed
wants to merge 1 commit into from

Conversation

aiven-anton
Copy link
Contributor

About this change - What it does

Use @contextmanager for handling ZooKeeper and Kafka test processes.

Why this way

This makes sure that the responsibility for stopping running processes does not leak to call sites, but is rather handled in the same place as the processes are spawned. This was found when upgrading pylint to latest version, which introduces a lint error for these cases.

@aiven-anton aiven-anton marked this pull request as ready for review January 31, 2023 13:49
@aiven-anton aiven-anton requested review from a team as code owners January 31, 2023 13:49
This makes sure that the responsibility for stopping running processes
does not leak to call sites.
@aiven-anton aiven-anton force-pushed the fix/use-context-managers-in-tests branch from 2544ac2 to f43841e Compare February 1, 2023 12:13
@cloudflare-pages
Copy link

cloudflare-pages bot commented Feb 1, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: f43841e
Status: ✅  Deploy successful!
Preview URL: https://44a785ce.karapace.pages.dev
Branch Preview URL: https://fix-use-context-managers-in-.karapace.pages.dev

View logs

@aiven-anton aiven-anton marked this pull request as draft February 1, 2023 13:17
@aiven-anton
Copy link
Contributor Author

There have been a few consecutive runs with timeouts now. I wonder if cleaning up the processes is the cause of the increased execution time. This needs more investigation, so changed to draft.

@tvainika tvainika removed request for a team February 10, 2023 07: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