diff --git a/lib/galaxy_test/api/test_workflows.py b/lib/galaxy_test/api/test_workflows.py index 8d998e7c337..e59b9d84044 100644 --- a/lib/galaxy_test/api/test_workflows.py +++ b/lib/galaxy_test/api/test_workflows.py @@ -2256,7 +2256,7 @@ test_data: type: File """, history_id=history_id, - assert_ok=False, + assert_ok=True, wait=True, ) history_contents = self.dataset_populator._get_contents_request(history_id=history_id).json() @@ -2314,7 +2314,7 @@ test_data: collection_type: "list:list:paired" """, history_id=history_id, - assert_ok=False, + assert_ok=True, wait=True, ) invocation = self.workflow_populator.get_invocation(job_summary.invocation_id, step_details=True) @@ -5910,12 +5910,6 @@ test_data: subworkflow_invocation_id = subworkflow_step["subworkflow_invocation_id"] subworkflow_invocation = self.workflow_populator.get_invocation(subworkflow_invocation_id) - - # The subworkflow should have succeeded - assert ( - subworkflow_invocation["state"] == "scheduled" - ), f"Expected subworkflow to succeed, got state: {subworkflow_invocation['state']}" - # Should not have error messages messages = subworkflow_invocation.get("messages", []) assert len(messages) == 0, f"Expected no error messages, got: {messages}" diff --git a/lib/galaxy_test/base/populators.py b/lib/galaxy_test/base/populators.py index 6137aaa6e57..5d01cb54813 100644 --- a/lib/galaxy_test/base/populators.py +++ b/lib/galaxy_test/base/populators.py @@ -2556,7 +2556,12 @@ class BaseWorkflowPopulator(BasePopulator): # Wait for workflow to become fully scheduled and then for all jobs # complete. if wait: - workflow_populator.wait_for_workflow(workflow_id, invocation_id, history_id, assert_ok=assert_ok) + if assert_ok: + workflow_populator.wait_for_invocation_and_completion(invocation_id) + else: + workflow_populator.wait_for_workflow( + workflow_id, invocation_id, history_id, assert_ok=assert_ok + ) jobs.extend(self.dataset_populator.invocation_jobs(invocation_id)) return RunJobsSummary(