Skip to content

Commit

Permalink
Bump pytest-celery to 1.0.0b4 (#8899)
Browse files Browse the repository at this point in the history
* Bump pytest-celery to 1.0.0b4

* Fixed test_max_prefetch_passed_on_broker_restart

* Fixed test_max_prefetch_not_passed_on_broker_restart
  • Loading branch information
Nusnus committed Mar 11, 2024
1 parent 62a1a50 commit c3dac19
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements/extras/pytest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pytest-celery==1.0.0b1
pytest-celery==1.0.0b4
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pytest==8.1.1
pytest-celery==1.0.0b2
pytest-celery==1.0.0b4
pytest-rerunfailures==13.0.0
pytest-subtests==0.12.1
pytest-timeout==2.3.1
Expand Down
6 changes: 6 additions & 0 deletions t/smoke/tests/test_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ def default_worker_app(self, default_worker_app: Celery) -> Celery:
return app

def test_max_prefetch_passed_on_broker_restart(self, celery_setup: CeleryTestSetup):
if isinstance(celery_setup.broker, RedisTestBroker):
pytest.xfail("Real Bug: Broker does not fetch messages after restart")

sig = group(long_running_task.s(420) for _ in range(WORKER_CONCURRENCY))
sig.apply_async(queue=celery_setup.worker.worker_queue)
celery_setup.broker.restart()
Expand All @@ -92,6 +95,9 @@ def default_worker_app(self, default_worker_app: Celery) -> Celery:
return app

def test_max_prefetch_not_passed_on_broker_restart(self, celery_setup: CeleryTestSetup):
if isinstance(celery_setup.broker, RedisTestBroker):
pytest.xfail("Real Bug: Broker does not fetch messages after restart")

sig = group(long_running_task.s(10) for _ in range(WORKER_CONCURRENCY))
r = sig.apply_async(queue=celery_setup.worker.worker_queue)
celery_setup.broker.restart()
Expand Down
2 changes: 1 addition & 1 deletion t/smoke/workers/docker/dev
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ COPY --chown=test_user:test_user . /celery
RUN pip install --no-cache-dir --upgrade \
pip \
-e /celery[redis,pymemcache] \
psutil
pytest-celery==1.0.0b4

# The workdir must be /app
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion t/smoke/workers/docker/pypi
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ENV PYTHONDONTWRITEBYTECODE=1
RUN pip install --no-cache-dir --upgrade \
pip \
celery[redis,pymemcache]${CELERY_VERSION:+==$CELERY_VERSION} \
psutil
pytest-celery==1.0.0b4

# The workdir must be /app
WORKDIR /app
Expand Down

0 comments on commit c3dac19

Please sign in to comment.