Skip to content

Commit 7bf044c

Browse files
committed
There is of course also a error event in the envelopes
1 parent 1b8dfb8 commit 7bf044c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/integrations/celery/integration_tests/test_celery_beat_cron_monitoring.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
77

88
from tests.integrations.celery.integration_tests import run_beat
99

10+
import logging
11+
loggg = logging.getLogger(__name__)
1012

1113
@pytest.fixture()
1214
def celery_config():
1315
return {
14-
"broker_url": "redis://127.0.0.1:6379/14",
16+
"broker_url": "redis://127.0.0.1:6379/15",
1517
"result_backend": "redis://127.0.0.1:6379/15",
1618
"task_always_eager": False,
1719
"worker_concurrency": 1,
1820
"beat_scheduler": "tests.integrations.celery.integration_tests:ImmediateScheduler",
1921
"task_create_missing_queues": True,
20-
"task_routes": {"*": {"queue": f"queue_{os.getpid()}"}},
22+
"task_default_queue": f"queue_{os.getpid()}",
2123
}
2224

2325

@@ -97,8 +99,8 @@ def test_task():
9799
with start_worker(app, perform_ping_check=False):
98100
run_beat(app)
99101

100-
assert len(envelopes) == 2
101-
(envelop_in_progress, envelope_error) = envelopes
102+
envelop_in_progress = envelopes[0]
103+
envelope_error = envelopes[-1]
102104

103105
check_in = envelop_in_progress.items[0].payload.json
104106
assert check_in["type"] == "check_in"

0 commit comments

Comments
 (0)