diff --git a/lib/galaxy_test/base/api.py b/lib/galaxy_test/base/api.py index 6644de284d32..7ccb906a4ac7 100644 --- a/lib/galaxy_test/base/api.py +++ b/lib/galaxy_test/base/api.py @@ -58,8 +58,9 @@ def _request_celery_app(self, celery_session_app, celery_config): if os.environ.get("GALAXY_TEST_EXTERNAL") is None: from galaxy.celery import celery_app - celery_app.fork_pool.stop() - celery_app.fork_pool.join(timeout=5) + if hasattr(celery_app, "fork_pool"): + celery_app.fork_pool.stop() + celery_app.fork_pool.join(timeout=5) @pytest.fixture(autouse=True, scope="session") def _request_celery_worker(self, celery_session_worker, celery_config, celery_worker_parameters): diff --git a/packages/test_base/setup.cfg b/packages/test_base/setup.cfg index 79bbafcee13d..3957b23c59d6 100644 --- a/packages/test_base/setup.cfg +++ b/packages/test_base/setup.cfg @@ -42,6 +42,7 @@ install_requires = pytest PyYAML requests + pytest-celery packages = find: python_requires = >=3.7