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

feat test: add test for pipeline queue overlimit #4791

Merged
merged 2 commits into from
Mar 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions tests/dragonfly/connection_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,32 @@ async def push_pipeline(bad_actor_client, size=1):
assert info["dispatch_queue_bytes"] == 0


@dfly_args({"proactor_threads": 4, "pipeline_queue_limit": 10})
async def test_pipeline_overlimit(df_factory: DflyInstanceFactory):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This crashes without #4789 right ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crashes on my laptop, I am trying to see if I see crash in github also

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok it does not fail on github, but it fails constantly on my laptop.
I believe this is because the slowness of the github machine.
I suggest to just add this test as it

server = df_factory.create()
server.start()

client = server.client()

await client.set("x", "a" * 1024 * 5)

async def pipe_overlimit():
c = server.client()
pipe = c.pipeline()
for i in range(1000):
pipe.get("x")
logging.debug("Executing...")
res = await pipe.execute()
logging.debug(f"Executed.")

pipeline_tasks = [asyncio.create_task(pipe_overlimit()) for _ in range(20)]

await asyncio.sleep(2)
await client.config_set("pipeline_queue_limit", 10000)
for task in pipeline_tasks:
await task


async def test_client_unpause(df_factory):
server = df_factory.create()
server.start()
Expand Down
Loading