You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "liuxiaocs7 (via GitHub)" <gi...@apache.org> on 2023/03/17 06:58:37 UTC

[GitHub] [iceberg] liuxiaocs7 commented on a diff in pull request #7116: Aliyun: Remove AssertHelpers

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


##########
aliyun/src/test/java/org/apache/iceberg/aliyun/oss/TestOSSInputFile.java:
##########
@@ -61,13 +61,13 @@ public void testReadFile() throws Exception {
   @Test
   public void testOSSInputFile() {
     OSSURI uri = randomURI();
-    AssertHelpers.assertThrows(
-        "File length should not be negative",
-        ValidationException.class,
-        "Invalid file length",
-        () ->
-            new OSSInputFile(
-                ossClient().get(), uri, aliyunProperties, -1, MetricsContext.nullMetrics()));
+    Assertions.assertThatThrownBy(
+            () ->
+                new OSSInputFile(
+                    ossClient().get(), uri, aliyunProperties, -1, MetricsContext.nullMetrics()),
+            "File length should not be negative")

Review Comment:
   > nit: I would probably remove the description `File length should not be negative` from here as it doesn't add any value. However in other places in the codebase the description might be useful. Going forward it would be good to double-check if having the description makes sense
   
   Thank you for your comments, I will check it before modifying.



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org