xBis7 commented on code in PR #3741:
URL: https://github.com/apache/ozone/pull/3741#discussion_r1123160088
##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestContainerPersistence.java:
##########
@@ -286,19 +288,161 @@ public void testDeleteContainer() throws Exception {
BlockData someKey1 = new BlockData(blockID1);
someKey1.setChunks(new LinkedList<ContainerProtos.ChunkInfo>());
blockManager.putBlock(container1, someKey1);
+ }
+
+ @Test
+ public void testDeleteNonEmptyContainer() throws Exception {
+ long testContainerID2 = getTestContainerID();
+ Container container2 = addContainer(containerSet, testContainerID2);
+ container2.close();
+
+ Assert.assertTrue(containerSet.getContainerMapCopy()
+ .containsKey(testContainerID2));
+
+ // With schema v3, we don't have a container dedicated db,
+ // so skip check the behaviors related to it.
+ assumeFalse(schemaVersion.contains(OzoneConsts.SCHEMA_V3));
Review Comment:
If you check the diffs, you can see this was part of a bigger test that I
refactored. It was returning in case we had SchemaV3 so I didn't check it out
or made any changes. I just broke it down to smaller tests.
You are right, it works regardless of Schema.
--
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]