| 15 | |
| 16 | |
| 17 | def test_run_worker(): |
| 18 | with pytest.raises(subprocess.CalledProcessError) as exc_info: |
| 19 | subprocess.check_output( |
| 20 | ["celery", "--config", "t.integration.worker_config", "worker"], |
| 21 | stderr=subprocess.STDOUT) |
| 22 | |
| 23 | called_process_error = exc_info.value |
| 24 | assert called_process_error.returncode == 1, called_process_error |
| 25 | output = called_process_error.output.decode('utf-8') |
| 26 | assert output.find( |
| 27 | "Retrying to establish a connection to the message broker after a connection " |
| 28 | "loss has been disabled (app.conf.broker_connection_retry_on_startup=False). " |
| 29 | "Shutting down...") != -1, output |
| 30 | |
| 31 | |
| 32 | def test_django_fixup_direct_worker(caplog, monkeypatch): |