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


##########
dell/src/test/java/org/apache/iceberg/dell/ecs/TestEcsOutputFile.java:
##########
@@ -88,10 +88,8 @@ public void testFileAlreadyExists() throws IOException {
       output.write("1234567890".getBytes());
     }
 
-    AssertHelpers.assertThrows(
-        "Create should throw exception",
-        AlreadyExistsException.class,
-        outputFile.location(),
-        outputFile::create);
+    Assertions.assertThatThrownBy(outputFile::create)
+        .isInstanceOf(AlreadyExistsException.class)
+        .hasMessageContaining(outputFile.location());

Review Comment:
   Done!



##########
dell/src/test/java/org/apache/iceberg/dell/ecs/TestEcsTableOperations.java:
##########
@@ -57,15 +57,15 @@ public void testConcurrentCommit() {
     // Use the TableOperations to test the CommitFailedException
     // High level actions, such as Table#updateProperties(), may refresh 
metadata.
     TableOperations operations = ((HasTableOperations) 
catalog2Table).operations();
-    AssertHelpers.assertThrows(
-        "Commit failed when use out-dated status",
-        CommitFailedException.class,
-        () ->
-            operations.commit(
-                operations.current(),
-                TableMetadata.buildFrom(operations.current())
-                    .removeProperties(ImmutableSet.of("a"))
-                    .build()));
+    Assertions.assertThatThrownBy(
+            () ->
+                operations.commit(
+                    operations.current(),
+                    TableMetadata.buildFrom(operations.current())
+                        .removeProperties(ImmutableSet.of("a"))
+                        .build()))
+        .isInstanceOf(CommitFailedException.class)
+        .hasMessageContaining("Replace failed, E-Tag ");

Review Comment:
   Done!



##########
dell/src/test/java/org/apache/iceberg/dell/ecs/TestEcsURI.java:
##########
@@ -54,10 +54,9 @@ private void assertURI(String bucket, String name, EcsURI 
ecsURI) {
 
   @Test
   public void testInvalidLocation() {
-    AssertHelpers.assertThrows(
-        "Invalid location should cause exception",
-        ValidationException.class,
-        "http://bucket/a";,
-        () -> new EcsURI("http://bucket/a";));
+
+    Assertions.assertThatThrownBy(() -> new EcsURI("http://bucket/a";))
+        .isInstanceOf(ValidationException.class)
+        .hasMessageContaining("http://bucket/a";);

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