From 192c1057196ef02b0d619fce1063b8e293cc957b Mon Sep 17 00:00:00 2001 From: Belal Ansari Date: Wed, 14 May 2025 18:58:41 +0530 Subject: [PATCH] ACS-9578 Changes done as part of test case failure for AddToHoldsBulkV1Tests (#3345) --- .../rest/rm/community/hold/AddToHoldsBulkV1Tests.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/amps/ags/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/AddToHoldsBulkV1Tests.java b/amps/ags/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/AddToHoldsBulkV1Tests.java index 4b006b5e8e..198d76d4c6 100644 --- a/amps/ags/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/AddToHoldsBulkV1Tests.java +++ b/amps/ags/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/AddToHoldsBulkV1Tests.java @@ -134,6 +134,15 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest .until(() -> getRestAPIFactory().getSearchAPI(null).search(searchRequest).getPagination() .getTotalItems() == NUMBER_OF_FILES); + RestRequestQueryModel ancestorReq = getContentFromFolderAndAllSubfoldersQuery(rootFolder.getNodeRefWithoutVersion()); + SearchRequest ancestorSearchRequest = new SearchRequest(); + ancestorSearchRequest.setQuery(ancestorReq); + + STEP("Wait until paths are indexed."); + await().atMost(30, TimeUnit.SECONDS) + .until(() -> getRestAPIFactory().getSearchAPI(null).search(ancestorSearchRequest).getPagination() + .getTotalItems() == NUMBER_OF_FILES); + holdBulkOperation = HoldBulkOperation.builder() .query(queryReq) .op(HoldBulkOperationType.ADD).build();