Skip to content

Commit

Permalink
Fix integ test to make sure we get proper error
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Widdis <widdis@gmail.com>
  • Loading branch information
dbwiddis committed Dec 28, 2023
1 parent 6d4e94c commit 2933dab
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public void testCreateAndProvisionRemoteModelWorkflow() throws Exception {
Workflow cyclicalWorkflow = new Workflow(
originalWorkflow.userParams(),
originalWorkflow.nodes(),
List.of(new WorkflowEdge("workflow_step_1", "workflow_step_2"), new WorkflowEdge("workflow_step_2", "workflow_step_1"))
List.of(new WorkflowEdge("workflow_step_2", "workflow_step_3"), new WorkflowEdge("workflow_step_3", "workflow_step_2"))
);

Template cyclicalTemplate = new Template.Builder().name(template.name())
Expand All @@ -155,7 +155,10 @@ public void testCreateAndProvisionRemoteModelWorkflow() throws Exception {

// Hit dry run
ResponseException exception = expectThrows(ResponseException.class, () -> createWorkflowValidation(cyclicalTemplate));
assertTrue(exception.getMessage().contains("Cycle detected: [workflow_step_2->workflow_step_1, workflow_step_1->workflow_step_2]"));
// output order not guaranteed
assertTrue(exception.getMessage().contains("Cycle detected"));
assertTrue(exception.getMessage().contains("workflow_step_2->workflow_step_3"));
assertTrue(exception.getMessage().contains("workflow_step_3->workflow_step_2"));

// Hit Create Workflow API with original template
Response response = createWorkflow(template);
Expand Down

0 comments on commit 2933dab

Please sign in to comment.