Skip to content

Commit

Permalink
Add thread sleep to wait for deletion to complete
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 35c9ce1 commit 258d4fa
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,13 @@ public void testCreateAndProvisionAgentFrameworkWorkflow() throws Exception {
Response deleteResponse = deleteWorkflow(workflowId);
assertEquals(RestStatus.OK, TestHelpers.restStatus(deleteResponse));

// wait for deletion to complete
Thread.sleep(30000);

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

}

}

0 comments on commit 258d4fa

Please sign in to comment.