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


##########
data/src/test/java/org/apache/iceberg/io/TestPartitioningWriters.java:
##########
@@ -137,11 +137,10 @@ public void testClusteredDataWriterOutOfOrderPartitions() 
throws IOException {
     writer.write(toRow(4, "bbb"), spec, partitionKey(spec, "bbb"));
     writer.write(toRow(5, "ccc"), spec, partitionKey(spec, "ccc"));
 
-    AssertHelpers.assertThrows(
-        "Should fail to write out of order partitions",
-        IllegalStateException.class,
-        "Encountered records that belong to already closed files",
-        () -> writer.write(toRow(6, "aaa"), spec, partitionKey(spec, "aaa")));
+    Assertions.assertThatThrownBy(
+            () -> writer.write(toRow(6, "aaa"), spec, partitionKey(spec, 
"aaa")))
+        .isInstanceOf(IllegalStateException.class)
+        .hasMessageContaining("Encountered records that belong to already 
closed files");

Review Comment:
   let's try and use `hasMessage` where possible and only fallback to 
`hasMessageContaining` for dynamic parts that change with every CI run (like 
time and such)



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