| 8 | |
| 9 | class test_config_serialization: |
| 10 | def test_accept(self, celery_app): |
| 11 | app = celery_app |
| 12 | # Redefine env to use in subprocess |
| 13 | # broker_url and result backend are different for each integration test backend |
| 14 | passenv = { |
| 15 | **os.environ, |
| 16 | "CELERY_BROKER_URL": app.conf.broker_url, |
| 17 | "CELERY_RESULT_BACKEND": app.conf.result_backend, |
| 18 | } |
| 19 | with ThreadPoolExecutor(max_workers=2) as executor: |
| 20 | f1 = executor.submit(get_worker_error_messages, "w1", passenv) |
| 21 | f2 = executor.submit(get_worker_error_messages, "w2", passenv) |
| 22 | time.sleep(3) |
| 23 | log1 = f1.result() |
| 24 | log2 = f2.result() |
| 25 | |
| 26 | for log in [log1, log2]: |
| 27 | assert log.find(disabled_error_message) == -1, log |
| 28 | |
| 29 | |
| 30 | def get_worker_error_messages(name, env): |