This repository was archived by the owner on Mar 31, 2026. It is now read-only.
Repository navigation
refactor: move system tests to single event loop - #1714
Merged
Merged
Conversation
chandra-siri
marked this pull request as ready for review
January 21, 2026 16:19
googlyrahman
approved these changes
Jan 22, 2026
jasha26
reviewed
Jan 22, 2026
Collaborator
There was a problem hiding this comment.
May be not in this PR, but i guess we should refactor this file as there is a lot of duplication. I suggest following
- Create a fixture that handles both the generation of a unique object_name and its subsequent cleanup. This removes the need to manually append to blobs_to_delete and call gc.collect() in every test. We do this almost in every test here
- Instead of defining a nested async def _run() and calling run_until_complete in every function, create a module-level helper or a fixture that accepts a coroutine.
- Can we implement context manager for reader and writer so we can simplify the usage like below:
async with AsyncAppendableObjectWriter(client, bucket, name) as writer:
await writer.append(data)
- [Optional]: Since many tests switch between grpc_client and grpc_client_direct, the existing grpc_clients fixture is already a good step. To further reduce code, you can use a fixture that automatically selects the client based on a test parameter (e.g., attempt_direct_path).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
refactor: move system tests to single event loop.