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 Redis container from aborting randomly #405

Merged
merged 5 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion src/pytest_celery/vendors/redis/backend/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
Returns:
list[str]: Docker CMD instruction.
"""
return default_redis_backend_cls.command("--maxclients", "100000")
return default_redis_backend_cls.command()

Check warning on line 67 in src/pytest_celery/vendors/redis/backend/fixtures.py

View check run for this annotation

Codecov / codecov/patch

src/pytest_celery/vendors/redis/backend/fixtures.py#L67

Added line #L67 was not covered by tests


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion src/pytest_celery/vendors/redis/broker/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
Returns:
list[str]: Docker CMD instruction.
"""
return default_redis_broker_cls.command("--maxclients", "100000")
return default_redis_broker_cls.command()

Check warning on line 67 in src/pytest_celery/vendors/redis/broker/fixtures.py

View check run for this annotation

Codecov / codecov/patch

src/pytest_celery/vendors/redis/broker/fixtures.py#L67

Added line #L67 was not covered by tests


@pytest.fixture
Expand Down
13 changes: 12 additions & 1 deletion src/pytest_celery/vendors/redis/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,18 @@
wait_for_client: bool = True,
**kwargs: dict,
) -> list[str]:
return ["redis-server", *args]
return [

Check warning on line 47 in src/pytest_celery/vendors/redis/container.py

View check run for this annotation

Codecov / codecov/patch

src/pytest_celery/vendors/redis/container.py#L47

Added line #L47 was not covered by tests
"redis-server",
"--save",
"",
"--appendonly",
"no",
"--maxmemory-policy",
"noeviction",
Nusnus marked this conversation as resolved.
Show resolved Hide resolved
"--protected-mode",
"no",
Nusnus marked this conversation as resolved.
Show resolved Hide resolved
*args,
]

@property
def url(self) -> str:
Expand Down