ChenSammi commented on code in PR #9413:
URL: https://github.com/apache/ozone/pull/9413#discussion_r2626346476
##########
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:
@priyeshkaratha , I'm a bit confused by L196, and L199, if
scm.getClientProtocolServer().getDeletedBlockSummary()).getTotalBlockCount() is
0, which means all blocks are acked for deletion on DNs, then how
verifyPendingDeletionAfterKeyDeletionDn will succeed?
--
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]