Skip to content

Commit

Permalink
[fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case f…
Browse files Browse the repository at this point in the history
…or calculating the NodeSize.
  • Loading branch information
mohit-singh4 committed Nov 12, 2024
1 parent b19b573 commit dc9d8a3
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ public void checkSizeDetailsWithInvalidJobId() throws Exception
.and().field("name").is("sampleLargeContent.txt")
.and().field("content.mimeType").is(FileType.TEXT_PLAIN.mimeType);

STEP("3. Wait for 20 seconds so that the content is indexed in Search Service.");
Thread.sleep(20000);
STEP("3. Wait for 30 seconds so that the content is indexed in Search Service.");
Utility.waitToLoopTime(30);

RestSizeDetailsModel restSizeDetailsModel = restClient.authenticateUser(user1).withCoreAPI().usingNode(folder).executeSizeDetails();
restClient.assertStatusCodeIs(HttpStatus.ACCEPTED);
Expand All @@ -126,7 +126,7 @@ public void checkSizeDetailsWithInvalidJobId() throws Exception
jobId += RandomStringUtils.randomAlphanumeric(2);

STEP("5. Wait for 3 seconds for the processing to complete.");
Thread.sleep(3000);
Utility.waitToLoopTime(3);

restClient.authenticateUser(user1).withCoreAPI().usingNode(folder).getSizeDetails(jobId);
restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND);
Expand Down Expand Up @@ -155,8 +155,8 @@ public void checkSizeDetailsWithoutExecuteSizeDetails() throws Exception
.and().field("name").is("sampleLargeContent.txt")
.and().field("content.mimeType").is(FileType.TEXT_PLAIN.mimeType);

STEP("3. Wait for 20 seconds so that the content is indexed in Search Service.");
Thread.sleep(20000);
STEP("3. Wait for 30 seconds so that the content is indexed in Search Service.");
Utility.waitToLoopTime(30);

STEP("4. Checking nodeSizeDetails without executing POST:nodes/{nodeId}/size-details endpoint");
RestSizeDetailsModel restSizeDetailsModel = restClient.authenticateUser(user1).withCoreAPI().usingNode(folder).getSizeDetails(jobId);
Expand Down Expand Up @@ -253,7 +253,7 @@ public void calculateNodeSizeForMultipleFiles() throws InterruptedException
});

STEP("4. Wait for 30 seconds so that the content is indexed in Search Service.");
Thread.sleep(30000);
Utility.waitToLoopTime(30);

RestSizeDetailsModel restSizeDetailsModel = restClient
.authenticateUser(user1)
Expand All @@ -267,7 +267,7 @@ public void calculateNodeSizeForMultipleFiles() throws InterruptedException
String jobId = restSizeDetailsModel.getJobId();

STEP("5. Wait for 3 seconds for the processing to complete.");
Thread.sleep(3000);
Utility.waitToLoopTime(3);

RestSizeDetailsModel sizeDetailsModel = restClient
.withCoreAPI()
Expand Down Expand Up @@ -325,7 +325,7 @@ public void checkNumberOfFiles() throws InterruptedException
});

STEP("4. Wait for 30 seconds so that the content is indexed in Search Service.");
Thread.sleep(30000);
Utility.waitToLoopTime(30);

RestSizeDetailsModel restSizeDetailsModel = restClient
.authenticateUser(user1)
Expand All @@ -339,7 +339,7 @@ public void checkNumberOfFiles() throws InterruptedException
String jobId = restSizeDetailsModel.getJobId();

STEP("5. Wait for 3 seconds for the processing to complete.");
Thread.sleep(3000);
Utility.waitToLoopTime(3);

RestSizeDetailsModel sizeDetailsModel = restClient
.withCoreAPI()
Expand Down

0 comments on commit dc9d8a3

Please sign in to comment.