priyeshkaratha commented on code in PR #9413:
URL: https://github.com/apache/ozone/pull/9413#discussion_r2626473555
##########
hadoop-ozone/integration-test-recon/src/test/java/org/apache/hadoop/ozone/recon/TestStorageDistributionEndpoint.java:
##########
@@ -190,19 +188,110 @@ public void
testStorageDistributionEndpoint(ReplicationConfig replicationConfig)
}
}
waitForKeysCreated(replicationConfig);
- Thread.sleep(10000);
- StringBuilder urlBuilder = new StringBuilder();
- urlBuilder.append(getReconWebAddress(conf))
- .append(STORAGE_DIST_ENDPOINT);
- String response = TestReconEndpointUtil.makeHttpCall(conf, urlBuilder);
- StorageCapacityDistributionResponse storageResponse =
- MAPPER.readValue(response, StorageCapacityDistributionResponse.class);
-
- assertEquals(20, storageResponse.getGlobalNamespace().getTotalKeys());
- assertEquals(60, storageResponse.getGlobalNamespace().getTotalUsedSpace());
- assertEquals(0, storageResponse.getUsedSpaceBreakDown().getOpenKeyBytes());
- assertEquals(60,
storageResponse.getUsedSpaceBreakDown().getCommittedKeyBytes());
- assertEquals(3, storageResponse.getDataNodeUsage().size());
+ GenericTestUtils.waitFor(this::verifyStorageDistributionAfterKeyCreation,
1000, 30000);
+ closeAllContainers();
+ fs.delete(dir1, true);
+ GenericTestUtils.waitFor(this::verifyPendingDeletionAfterKeyDeletionOm,
1000, 30000);
+ GenericTestUtils.waitFor(this::verifyPendingDeletionAfterKeyDeletionScm,
2000, 30000);
+ GenericTestUtils.waitFor(() ->
+
Objects.requireNonNull(scm.getClientProtocolServer().getDeletedBlockSummary()).getTotalBlockCount()
== 0,
+ 1000, 30000);
+ GenericTestUtils.waitFor(this::verifyPendingDeletionAfterKeyDeletionDn,
2000, 60000);
Review Comment:
@ChenSammi DN Block Deletion interval is 30 sec and once after clearing scm
blocks there will be pending deletion at DN side.
verifyPendingDeletionAfterKeyDeletionDn checks pending size at DN side even
after clearing scm pending data.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]