Skip to content

Commit

Permalink
add more timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Jackie Han <[email protected]>
  • Loading branch information
jackiehanyang committed Dec 22, 2023
1 parent bea24d2 commit cf549b0
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,21 +197,25 @@ public void testCreateAndProvisionAgentFrameworkWorkflow() throws Exception {
// Assert based on the agent-framework template
List<ResourceCreated> resourcesCreated = searchHitWorkflowState.resourcesCreated();
assertEquals(5, resourcesCreated.size());
assertEquals("register_agent", resourcesCreated.get(0).workflowStepName());
assertEquals("create_connector", resourcesCreated.get(0).workflowStepName());
assertNotNull(resourcesCreated.get(0).resourceId());

// Hit Deprovision API
Response deprovisionResponse = deprovisionWorkflow(workflowId);
assertEquals(RestStatus.OK, TestHelpers.restStatus(deprovisionResponse));
getAndAssertWorkflowStatus(workflowId, State.NOT_STARTED, ProvisioningProgress.NOT_STARTED);
assertBusy(
() -> { getAndAssertWorkflowStatus(workflowId, State.NOT_STARTED, ProvisioningProgress.NOT_STARTED); },
30,
TimeUnit.SECONDS
);

// Hit Delete API
Response deleteResponse = deleteWorkflow(workflowId);
assertEquals(RestStatus.OK, TestHelpers.restStatus(deleteResponse));

// Search this workflow id in global_context index to make sure it's deleted
SearchResponse searchResponseAfterDeletion = searchWorkflows(query);
assertEquals(0, searchResponse.getHits().getTotalHits().value);
assertBusy(() -> assertEquals(0, searchResponseAfterDeletion.getHits().getTotalHits().value), 30, TimeUnit.SECONDS);
}

}

0 comments on commit cf549b0

Please sign in to comment.