This is an automated email from the ASF dual-hosted git repository.
jojochuang pushed a commit to branch ozone-2.1.2
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/ozone-2.1.2 by this push:
new d42533bb133 Drop TestHddsDispatcher tests that require unbackported
HDDS-14831/15301.
d42533bb133 is described below
commit d42533bb133e5b1081b2bb7f0afc65442505fc2b
Author: Wei-Chiu Chuang <[email protected]>
AuthorDate: Thu Aug 27 13:34:22 2026 -0700
Drop TestHddsDispatcher tests that require unbackported HDDS-14831/15301.
These tests were pulled in with the HDDS-15791 cherry-pick but depend on
canIgnoreException handling not present on the ozone-2.1 line.
Co-authored-by: Cursor <[email protected]>
Change-Id: I3cc038e4bc905dbcdfb843843f2add54116d80c8
---
.../container/common/impl/TestHddsDispatcher.java | 83 ----------------------
1 file changed, 83 deletions(-)
diff --git
a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestHddsDispatcher.java
b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestHddsDispatcher.java
index 3201ca4b5a1..aac75cac29c 100644
---
a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestHddsDispatcher.java
+++
b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestHddsDispatcher.java
@@ -26,7 +26,6 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.any;
@@ -496,88 +495,6 @@ public void testWriteChunkWithCreateContainerFailure()
throws IOException {
}
}
- @Test
- public void testCreateContainerWhenAlreadyExistsDoesNotMarkUnhealthy()
throws IOException {
- String testDirPath = testDir.getPath();
- try {
- UUID scmId = UUID.randomUUID();
- OzoneConfiguration conf = new OzoneConfiguration();
- conf.set(HDDS_DATANODE_DIR_KEY, testDirPath);
- conf.set(OzoneConfigKeys.OZONE_METADATA_DIRS, testDirPath);
- DatanodeDetails dd = randomDatanodeDetails();
- HddsDispatcher hddsDispatcher = createDispatcher(dd, scmId, conf);
-
- ContainerCommandRequestProto writeChunkRequest =
- getWriteChunkRequest(dd.getUuidString(), 1L, 1L);
- ContainerCommandResponseProto initialResponse =
- hddsDispatcher.dispatch(writeChunkRequest, null);
- assertEquals(ContainerProtos.Result.SUCCESS,
initialResponse.getResult());
-
- ContainerCommandRequestProto createRequest =
- ContainerCommandRequestProto.newBuilder()
- .setCmdType(ContainerProtos.Type.CreateContainer)
- .setContainerID(1L)
-
.setCreateContainer(ContainerProtos.CreateContainerRequestProto.newBuilder()
-
.setContainerType(ContainerProtos.ContainerType.KeyValueContainer)
- .build())
- .setDatanodeUuid(dd.getUuidString())
- .build();
-
- ContainerCommandResponseProto response =
- hddsDispatcher.dispatch(createRequest, null);
- assertEquals(ContainerProtos.Result.CONTAINER_ALREADY_EXISTS,
response.getResult());
-
- Container container = hddsDispatcher.getContainer(1L);
- assertNotNull(container);
- assertTrue(container.getContainerData().isOpen());
- assertFalse(container.getContainerData().isUnhealthy());
- } finally {
- ContainerMetrics.remove();
- }
- }
-
- @Test
- public void testMalformedPutBlockDoesNotMarkContainerUnhealthy() throws
IOException {
- String testDirPath = testDir.getPath();
- try {
- UUID scmId = UUID.randomUUID();
- OzoneConfiguration conf = new OzoneConfiguration();
- conf.set(HDDS_DATANODE_DIR_KEY, testDirPath);
- conf.set(OzoneConfigKeys.OZONE_METADATA_DIRS, testDirPath);
- DatanodeDetails dd = randomDatanodeDetails();
- HddsDispatcher hddsDispatcher = createDispatcher(dd, scmId, conf);
-
- ContainerCommandRequestProto writeChunkRequest =
- getWriteChunkRequest(dd.getUuidString(), 1L, 1L);
- ContainerCommandResponseProto writeChunkResponse =
- hddsDispatcher.dispatch(writeChunkRequest, null);
- assertEquals(ContainerProtos.Result.SUCCESS,
writeChunkResponse.getResult());
-
- ContainerCommandRequestProto putBlockRequest =
- ContainerTestHelper.getPutBlockRequest(writeChunkRequest);
- ContainerProtos.BlockData malformedBlockData =
- putBlockRequest.getPutBlock().getBlockData().toBuilder()
- .setSize(putBlockRequest.getPutBlock().getBlockData().getSize()
+ 1)
- .build();
- ContainerCommandRequestProto malformedPutBlockRequest =
- putBlockRequest.toBuilder()
- .setPutBlock(putBlockRequest.getPutBlock().toBuilder()
- .setBlockData(malformedBlockData))
- .build();
-
- ContainerCommandResponseProto response =
- hddsDispatcher.dispatch(malformedPutBlockRequest, null);
- assertEquals(ContainerProtos.Result.MALFORMED_REQUEST,
response.getResult());
-
- Container container = hddsDispatcher.getContainer(1L);
- assertNotNull(container);
- assertTrue(container.getContainerData().isOpen());
- assertFalse(container.getContainerData().isUnhealthy());
- } finally {
- ContainerMetrics.remove();
- }
- }
-
@Test
public void testDuplicateWriteChunkAndPutBlockRequest() throws IOException {
String testDirPath = testDir.getPath();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]