Cyrill commented on code in PR #4041:
URL: https://github.com/apache/ozone/pull/4041#discussion_r1045290000


##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestChunkStreams.java:
##########
@@ -95,52 +98,52 @@ public synchronized  int read(byte[] b, int off, int len)
 
   @Test
   public void testErrorReadGroupInputStream() throws Exception {
-    try (KeyInputStream groupInputStream = new KeyInputStream()) {
-
-      String dataString = RandomStringUtils.randomAscii(500);
-      byte[] buf = dataString.getBytes(UTF_8);
-      int offset = 0;
-      for (int i = 0; i < 5; i++) {
-        int tempOffset = offset;
-        BlockInputStream in =
-            new BlockInputStream(null, 100, null, null, true, null) {
-              private long pos = 0;
-              private ByteArrayInputStream in =
-                  new ByteArrayInputStream(buf, tempOffset, 100);
-
-              @Override
-              public synchronized void seek(long pos) throws IOException {
-                throw new UnsupportedOperationException();
-              }
-
-              @Override
-              public synchronized long getPos() {
-                return pos;
-              }
-
-              @Override
-              public synchronized boolean seekToNewSource(long targetPos)
-                  throws IOException {
-                throw new UnsupportedOperationException();
-              }
-
-              @Override
-              public synchronized int read() throws IOException {
-                return in.read();
-              }
-
-              @Override
-              public synchronized int read(byte[] b, int off, int len)
-                  throws IOException {
-                int readLen = in.read(b, off, len);
-                pos += readLen;
-                return readLen;
-              }
-            };
-        offset += 100;
-        groupInputStream.addStream(in);
-      }
-
+    String dataString = RandomStringUtils.randomAscii(500);
+    byte[] buf = dataString.getBytes(UTF_8);
+    List<BlockInputStream> streams = new ArrayList<>();
+    int offset = 0;
+    for (int i = 0; i < 5; i++) {
+      int tempOffset = offset;
+      BlockInputStream in =
+          new BlockInputStream(null, 100, null, null, true, null) {
+            private long pos = 0;
+            private ByteArrayInputStream in =
+                new ByteArrayInputStream(buf, tempOffset, 100);
+
+            @Override

Review Comment:
   Done



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