From a253d52827701f7cd1f033df6b57307d0c9fd6fc Mon Sep 17 00:00:00 2001 From: John Chilton Date: Thu, 15 Aug 2019 14:26:26 -0400 Subject: [PATCH] Try separate amqp connection from database for integration testing. In case this is what is holding on to the connection causing tests to fail. --- test/base/driver_util.py | 7 ++++++- test/integration/test_data_manager_table_reload.py | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/base/driver_util.py b/test/base/driver_util.py index 4a140ecc339..9fae2c88ac2 100644 --- a/test/base/driver_util.py +++ b/test/base/driver_util.py @@ -135,7 +135,8 @@ def setup_galaxy_config( prefer_template_database=False, log_format=None, conda_auto_init=False, - conda_auto_install=False + conda_auto_install=False, + use_shared_connection_for_amqp=False, ): """Setup environment and build config for test Galaxy instance.""" # For certain docker operations this needs to be evaluated out - e.g. for cwltool. @@ -238,6 +239,9 @@ def setup_galaxy_config( monitor_thread_join_timeout=5, object_store_store_by="uuid", ) + if not use_shared_connection_for_amqp: + config["amqp_internal_connection"] = "sqlalchemy+sqlite:///%s?isolation_level=IMMEDIATE" % os.path.join(tmpdir, "control.sqlite") + config.update(database_conf(tmpdir, prefer_template_database=prefer_template_database)) config.update(install_database_conf(tmpdir, default_merged=default_install_db_merged)) if asbool(os.environ.get("GALAXY_TEST_USE_HIERARCHICAL_OBJECT_STORE")): @@ -928,6 +932,7 @@ class GalaxyTestDriver(TestDriver): log_format=self.log_format, conda_auto_init=getattr(config_object, "conda_auto_init", False), conda_auto_install=getattr(config_object, "conda_auto_install", False), + use_shared_connection_for_amqp=getattr(config_object, "use_shared_connection_for_amqp", False) ) galaxy_config = setup_galaxy_config( galaxy_db_path, diff --git a/test/integration/test_data_manager_table_reload.py b/test/integration/test_data_manager_table_reload.py index 7c8bd8d0703..f63a503cfd0 100644 --- a/test/integration/test_data_manager_table_reload.py +++ b/test/integration/test_data_manager_table_reload.py @@ -25,6 +25,7 @@ class DataManagerIntegrationTestCase(integration_util.IntegrationTestCase, UsesS """Test data manager installation and table reload through the API""" framework_tool_and_types = True + use_shared_connection_for_amqp = True def setUp(self): super(DataManagerIntegrationTestCase, self).setUp()