From 45d5e29c1dcc30e896ed3fc408b2005a35d11ba6 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Sat, 19 Sep 2015 11:55:12 +0100 Subject: [PATCH 1/2] Extend test_map_over_two_collections timeout. May be the cause of intermittent test failure on jenkins (https://jenkins.galaxyproject.org/job/G-API/lastCompletedBuild/default/testReport/api.test_tools/ToolsTestCase/test_map_over_two_collections/). --- test/api/test_tools.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/api/test_tools.py b/test/api/test_tools.py index b7507c37414..62db749398f 100644 --- a/test/api/test_tools.py +++ b/test/api/test_tools.py @@ -780,6 +780,7 @@ class ToolsTestCase( api.ApiTestCase ): self.assertEquals( len( outputs ), 2 ) output1 = outputs[ 0 ] output2 = outputs[ 1 ] + self.dataset_populator.wait_for_history( history_id, timeout=25 ) output1_content = self.dataset_populator.get_history_dataset_content( history_id, dataset=output1 ) output2_content = self.dataset_populator.get_history_dataset_content( history_id, dataset=output2 ) self.assertEquals( output1_content.strip(), "123\n789" ) From 69f4ace0bcdaedc4f2077baeaffe605eb7538d79 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Sat, 19 Sep 2015 12:24:36 +0100 Subject: [PATCH 2/2] Fix failing workflow to_dict editor test. Generating form HTML as part of this request requires a history now (since https://github.com/galaxyproject/galaxy/commit/a00461eaf61bdeeea0c42b8098ae5e6cfbe79694). This is a less than ideal since it should definitely not require a history, but it is also less than idea to be shipping HTML via the API for non-web transactions. So rather than solving the former problem, this solves the latter and just doesn't attach form HTML for API requests. Fixes #734. --- lib/galaxy/managers/workflows.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/managers/workflows.py b/lib/galaxy/managers/workflows.py index ef3767a16c1..e889075c615 100644 --- a/lib/galaxy/managers/workflows.py +++ b/lib/galaxy/managers/workflows.py @@ -335,6 +335,11 @@ class WorkflowContentsManager(UsesAnnotations): annotation_str = "" if step_annotation: annotation_str = step_annotation.annotation + form_html = None + if trans.history: + # If in a web session, attach form html. No reason to do + # so for API requests. + form_html = module.get_config_form() # Pack attributes into plain dictionary step_dict = { 'id': step.order_index, @@ -346,7 +351,7 @@ class WorkflowContentsManager(UsesAnnotations): 'tool_errors': module.get_errors(), 'data_inputs': module.get_data_inputs(), 'data_outputs': module.get_data_outputs(), - 'form_html': module.get_config_form(), + 'form_html': form_html, 'annotation': annotation_str, 'post_job_actions': {}, 'uuid': str(step.uuid) if step.uuid else None,