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

Increased Redis container --maxclients to 100k #115

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/pytest_celery/api/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def celeryconfig(self) -> dict:
raise NotImplementedError("CeleryTestContainer.celeryconfig")

@classmethod
def command(cls) -> list:
def command(cls, *args: str) -> list:
# To be used with pytest_docker_tools.container using the command
# kwarg with the class method as value
# e.g. command=MyContainer.command()
Expand Down
1 change: 1 addition & 0 deletions src/pytest_celery/vendors/redis/backend/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def default_redis_backend_cls() -> type[RedisContainer]:
network="{default_pytest_celery_network.name}",
wrapper_class=RedisContainer,
timeout=REDIS_CONTAINER_TIMEOUT,
command=RedisContainer.command("--maxclients", "100000"),
)


Expand Down
1 change: 1 addition & 0 deletions src/pytest_celery/vendors/redis/broker/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def default_redis_broker_cls() -> type[RedisContainer]:
network="{default_pytest_celery_network.name}",
wrapper_class=RedisContainer,
timeout=REDIS_CONTAINER_TIMEOUT,
command=RedisContainer.command("--maxclients", "100000"),
)


Expand Down
4 changes: 4 additions & 0 deletions src/pytest_celery/vendors/redis/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"vhost": self.vhost,
}

@classmethod

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

View check run for this annotation

Codecov / codecov/patch

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

Added line #L31 was not covered by tests
def command(cls, *args: str) -> list:
return ["redis-server", *args]

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

View check run for this annotation

Codecov / codecov/patch

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

Added line #L33 was not covered by tests

@property
def url(self) -> str:
return f"{self.prefix()}{self.hostname}/{self.vhost}"
Expand Down