Gargi-jais11 commented on code in PR #9316:
URL: https://github.com/apache/ozone/pull/9316#discussion_r2536264564


##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/stream/TestDirstreamClientHandler.java:
##########
@@ -113,6 +114,39 @@ public void splitContent() throws IOException {
     assertEquals("yyy", getContent("bsd.txt"));
   }
 
+  @Test
+  public void testInvalidFormatMissingSpace() {
+    final DirstreamClientHandler handler = new DirstreamClientHandler(

Review Comment:
   With the below given changes both specify correct test scenario.



##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/stream/TestDirstreamClientHandler.java:
##########
@@ -113,6 +114,39 @@ public void splitContent() throws IOException {
     assertEquals("yyy", getContent("bsd.txt"));
   }
 
+  @Test
+  public void testInvalidFormatMissingSpace() {
+    final DirstreamClientHandler handler = new DirstreamClientHandler(

Review Comment:
   This and the last test `testInvalidFormatOnlySize()` both are similar.
   



##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/stream/TestDirstreamClientHandler.java:
##########
@@ -113,6 +114,39 @@ public void splitContent() throws IOException {
     assertEquals("yyy", getContent("bsd.txt"));
   }
 
+  @Test
+  public void testInvalidFormatMissingSpace() {
+    final DirstreamClientHandler handler = new DirstreamClientHandler(
+        new DirectoryServerDestination(tmpDir));
+
+    IllegalArgumentException exception = 
assertThrows(IllegalArgumentException.class, () -> {
+      handler.doRead(null, wrap("123\n"));
+    });

Review Comment:
   You can change the input given to **"123File.txt"**, which shows that size 
and file name are not space separated.
   
   ```suggestion
       IllegalArgumentException exception = 
assertThrows(IllegalArgumentException.class, () -> {
         handler.doRead(null, wrap("123File.txt\n"));
       });
   ```



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