From 18901c779d03e526942f4ac747b8e656c4c02dba Mon Sep 17 00:00:00 2001 From: mohit-singh4 Date: Mon, 7 Oct 2024 16:41:34 +0530 Subject: [PATCH] [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details --- .../alfresco/rest/api/tests/NodeSizeDetailsTest.java | 12 +++++++----- .../main/resources/alfresco/repository.properties | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/remote-api/src/test/java/org/alfresco/rest/api/tests/NodeSizeDetailsTest.java b/remote-api/src/test/java/org/alfresco/rest/api/tests/NodeSizeDetailsTest.java index 63fe4077c1..61607b43e0 100644 --- a/remote-api/src/test/java/org/alfresco/rest/api/tests/NodeSizeDetailsTest.java +++ b/remote-api/src/test/java/org/alfresco/rest/api/tests/NodeSizeDetailsTest.java @@ -144,8 +144,9 @@ public class NodeSizeDetailsTest extends AbstractBaseApiTest assertNotNull("After executing GET/size-details, it will provide NodeSizeDetails with 200 status code", getResponse.getJsonResponse()); - NodeSizeDetails nodeSizeDetails = NodeSizeDetails.parseNodeSizeDetails((JSONObject) getResponse.getJsonResponse() - .get("entry")); + NodeSizeDetails nodeSizeDetails = NodeSizeDetails.parseNodeSizeDetails( + (JSONObject) getResponse.getJsonResponse() + .get("entry")); assertNotNull("We are not getting correct response " + nodeSizeDetails, nodeSizeDetails.getStatus()); } @@ -190,7 +191,7 @@ public class NodeSizeDetailsTest extends AbstractBaseApiTest postResponse.getJsonResponse()); JSONObject jsonObject = (JSONObject) postResponse.getJsonResponse() - .get("entry"); + .get("entry"); String jobId = (String) jsonObject.get("jobId"); assertNotNull("In response, JobId should be present", jobId); @@ -205,8 +206,9 @@ public class NodeSizeDetailsTest extends AbstractBaseApiTest assertNotNull("After executing GET/size-details, it will provide NodeSizeDetails with 200 status code", getResponse.getJsonResponse()); - NodeSizeDetails nodeSizeDetails = NodeSizeDetails.parseNodeSizeDetails((JSONObject) getResponse.getJsonResponse() - .get("entry")); + NodeSizeDetails nodeSizeDetails = NodeSizeDetails.parseNodeSizeDetails( + (JSONObject) getResponse.getJsonResponse() + .get("entry")); assertNotNull("We are not getting correct response " + nodeSizeDetails, nodeSizeDetails.getStatus()); diff --git a/repository/src/main/resources/alfresco/repository.properties b/repository/src/main/resources/alfresco/repository.properties index cb552f5e4a..f5dfa686a9 100644 --- a/repository/src/main/resources/alfresco/repository.properties +++ b/repository/src/main/resources/alfresco/repository.properties @@ -1386,8 +1386,8 @@ scripts.execution.maxMemoryUsedInBytes=-1 # Number of instructions that will trigger the observer scripts.execution.observerInstructionCount=5000 -#Default value being used in POST/size-details endpoint to partition a huge folder into smaller chunks -#so that we can compute more efficiently and consolidate all sizes into a single unit. +# Default value being used in POST/size-details endpoint to partition a huge folder into smaller chunks +# so that we can compute more efficiently and consolidate all sizes into a single unit. default.async.folder.items=1000 # Default NodeSize Thread pool