diff --git a/tests/conftest.py b/tests/conftest.py index 0207e07c..b30c7b49 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -8,6 +8,7 @@ from scrapyd import Config from scrapyd.app import application +from scrapyd.utils import get_spider_queues from scrapyd.website import Root from tests import root_add_version @@ -29,6 +30,9 @@ def root(request): yield Root(config, app) + for spiderqueue in get_spider_queues(config).values(): + spiderqueue.conn.close() + for setting in ("dbs_dir", "eggs_dir"): directory = os.path.realpath(config.get(setting)) basedir = os.path.realpath(os.path.dirname(os.path.dirname(__file__)))