diff --git a/src/test/java/org/opensearch/flowframework/rest/FlowFrameworkRestApiIT.java b/src/test/java/org/opensearch/flowframework/rest/FlowFrameworkRestApiIT.java index 8fa2fa43d..a8242f340 100644 --- a/src/test/java/org/opensearch/flowframework/rest/FlowFrameworkRestApiIT.java +++ b/src/test/java/org/opensearch/flowframework/rest/FlowFrameworkRestApiIT.java @@ -155,7 +155,11 @@ 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 + assertEquals("???", exception.getMessage()); + assertTrue(exception.getMessage().contains("Cycle detected")); + assertTrue(exception.getMessage().contains("workflow_step_2->workflow_step_1")); + assertTrue(exception.getMessage().contains("workflow_step_1->workflow_step_2")); // Hit Create Workflow API with original template Response response = createWorkflow(template);