nastra commented on code in PR #7116:
URL: https://github.com/apache/iceberg/pull/7116#discussion_r1139921246


##########
aliyun/src/test/java/org/apache/iceberg/aliyun/oss/TestOSSInputStream.java:
##########
@@ -99,14 +99,10 @@ public void testClose() throws Exception {
     OSSURI uri = new OSSURI(location("closed.dat"));
     SeekableInputStream closed = new OSSInputStream(ossClient().get(), uri);
     closed.close();
-    assertThrows(
-        "Cannot seek the input stream after closed.",
-        IllegalStateException.class,
-        "Cannot seek: already closed",
-        () -> {
-          closed.seek(0);
-          return null;
-        });
+    Assertions.assertThatThrownBy(
+            () -> closed.seek(0), "Cannot seek the input stream after closed.")

Review Comment:
   ```suggestion
               () -> closed.seek(0))
   ```



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