From f34bb5e1f66e47ae13396f8ab8d8336aa635a255 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Sat, 24 Dec 2016 16:09:15 -0500 Subject: [PATCH 1/2] Don't override Global tempfile.tmpdir for tests. Tests may bring up multiple Galaxy instances - for integration tests this leads to a longer temp path with each new Galaxy instance brought up. This in turn breaks Conda for tests on Jenkins. --- lib/galaxy/config.py | 4 +++- test/base/driver_util.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/config.py b/lib/galaxy/config.py index 2e7caaf741f1..b640d964e93e 100644 --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -73,7 +73,9 @@ def __init__( self, **kwargs ): # Where dataset files are stored self.file_path = resolve_path( kwargs.get( "file_path", "database/files" ), self.root ) self.new_file_path = resolve_path( kwargs.get( "new_file_path", "database/tmp" ), self.root ) - tempfile.tempdir = self.new_file_path + override_tempdir = string_as_bool( kwargs.get( "override_tempdir", "True" ) ) + if override_tempdir: + tempfile.tempdir = self.new_file_path self.openid_consumer_cache_path = resolve_path( kwargs.get( "openid_consumer_cache_path", "database/openid_consumer_cache" ), self.root ) self.cookie_path = kwargs.get( "cookie_path", "/" ) # Galaxy OpenID settings diff --git a/test/base/driver_util.py b/test/base/driver_util.py index ec7d4496ea74..a8cad0d48039 100644 --- a/test/base/driver_util.py +++ b/test/base/driver_util.py @@ -184,6 +184,7 @@ def setup_galaxy_config( library_import_dir=library_import_dir, log_destination="stdout", new_file_path=new_file_path, + override_tempdir=False, master_api_key=master_api_key, running_functional_tests=True, shed_tool_data_table_config=shed_tool_data_table_config, From a0aa70baa0573ff891f51f3ffbc29e07dcf970a5 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Sat, 24 Dec 2016 16:10:23 -0500 Subject: [PATCH 2/2] Fix broken integration test. It was simply checking the wrong condition. --- test/integration/test_job_resubmission.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration/test_job_resubmission.py b/test/integration/test_job_resubmission.py index d14b1ca2cf96..cefe368d36e6 100644 --- a/test/integration/test_job_resubmission.py +++ b/test/integration/test_job_resubmission.py @@ -53,9 +53,9 @@ def test_condition_expressions(self): "failure_state": "unknown_error"}) def test_condition_any_failure(self): - self._assert_job_fails(resource_parameters={"test_name": "test_condition_any_failure", - "initial_destination": "fail_first_any_failure", - "failure_state": "unknown_error"}) + self._assert_job_passes(resource_parameters={"test_name": "test_condition_any_failure", + "initial_destination": "fail_first_any_failure", + "failure_state": "unknown_error"}) def test_condition_attempt(self): self._assert_job_fails(resource_parameters={"test_name": "test_condition_attempt",