ayushtkn commented on a change in pull request #3216:
URL: https://github.com/apache/ozone/pull/3216#discussion_r833072524



##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainer.java
##########
@@ -110,18 +104,15 @@ public void testOzoneContainerStart() throws Exception {
     OzoneContainer container = null;
 
     try {
-      cluster = MiniOzoneCluster.newBuilder(conf).build();
-      cluster.waitForClusterToBeReady();
-
       Pipeline pipeline = MockPipeline.createSingleNodePipeline();
-      conf.set(HDDS_DATANODE_DIR_KEY, tempFolder.getRoot().getPath());
+      conf.set(OZONE_METADATA_DIRS, tempFolder.newFolder().getPath());
+      conf.set(HDDS_DATANODE_DIR_KEY, tempFolder.newFolder().getPath());
       conf.setInt(OzoneConfigKeys.DFS_CONTAINER_IPC_PORT,
           pipeline.getFirstNode()
               .getPort(DatanodeDetails.Port.Name.STANDALONE).getValue());
       conf.setBoolean(
           OzoneConfigKeys.DFS_CONTAINER_IPC_RANDOM_PORT, false);
 
-

Review comment:
       nit:
   you can avoid this

##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainer.java
##########
@@ -307,9 +291,18 @@ static void runTestBothGetandPutSmallFile(
           = ContainerTestHelper.getReadSmallFileRequest(client.getPipeline(),
           smallFileRequest.getPutSmallFile().getBlock());
       response = client.sendCommand(getSmallFileRequest);
-      Assert.assertArrayEquals(
-          smallFileRequest.getPutSmallFile().getData().toByteArray(),
-          response.getGetSmallFile().getData().getData().toByteArray());
+
+      Assert.assertEquals(ContainerProtos.Result.SUCCESS, 
response.getResult());
+
+      ContainerProtos.ReadChunkResponseProto chunkResponse =
+          response.getGetSmallFile().getData();
+      if (chunkResponse.hasDataBuffers()) {
+        Assert.assertArrayEquals(requestBytes,
+            chunkResponse.getDataBuffers().toByteArray());
+      } else {
+        Assert.assertArrayEquals(requestBytes,
+            chunkResponse.getData().toByteArray());
+      }

Review comment:
       This method is called only from``testBothGetandPutSmallFile`` which we 
have disabled now and I suppose it is to be chased as part of HDDS-6473, so why 
are we making changes to this method here?
   
   The test fails also in this method only...
   ```
   array lengths differed, expected.length=1024 actual.length=0; arrays first 
differed at element [0]; expected:<27> but was:<end of array>
   Expected :27
   Actual   :end of array
   ```

##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainer.java
##########
@@ -110,18 +104,15 @@ public void testOzoneContainerStart() throws Exception {
     OzoneContainer container = null;
 
     try {
-      cluster = MiniOzoneCluster.newBuilder(conf).build();
-      cluster.waitForClusterToBeReady();
-

Review comment:
       After this change:
   You don't need :
   ```
      MiniOzoneCluster cluster = null;
   ```
   
   And the line in the finally block below:
   ```
         if (cluster != null) {
           cluster.shutdown();
         }
   ```
   
   Here `cluster` will stay `null` always now, I suppose




-- 
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]

Reply via email to