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


##########
flink/v1.15/flink/src/test/java/org/apache/iceberg/flink/source/TestStreamScanSql.java:
##########
@@ -219,15 +219,13 @@ public void testConsumeFilesWithBranch() throws Exception 
{
     Row row1 = Row.of(1, "aaa", "2021-01-01");
     Row row2 = Row.of(2, "bbb", "2021-01-01");
     insertRows(table, row1, row2);
-
-    AssertHelpers.assertThrows(
-        "Cannot scan table using ref for stream yet",
-        IllegalArgumentException.class,
-        "Cannot scan table using ref",
-        () ->
-            exec(
-                "SELECT * FROM %s /*+ OPTIONS('streaming'='true', 
'monitor-interval'='1s', 'branch'='b1')*/",
-                TABLE));
+    Assertions.assertThatThrownBy(
+            () ->
+                exec(
+                    "SELECT * FROM %s /*+ OPTIONS('streaming'='true', 
'monitor-interval'='1s', 'branch'='b1')*/",
+                    TABLE))
+        .isInstanceOf(IllegalArgumentException.class)
+        .hasMessageContaining("Cannot scan table using ref");

Review Comment:
   should be aligned with 
https://github.com/apache/iceberg/pull/7481/files#diff-9c8a51c635b89bc826ca641580135b1f954cd8bbf9f1ee5443a2f182b1d9f311R229



##########
flink/v1.15/flink/src/test/java/org/apache/iceberg/flink/source/TestStreamScanSql.java:
##########
@@ -306,15 +304,13 @@ public void testConsumeFromStartTag() throws Exception {
       assertRows(ImmutableList.of(row7), iterator);
     }
     result.getJobClient().ifPresent(JobClient::cancel);
-
-    AssertHelpers.assertThrows(
-        "START_SNAPSHOT_ID and START_TAG cannot both be set.",
-        IllegalArgumentException.class,
-        "START_SNAPSHOT_ID and START_TAG cannot both be set.",
-        () ->
-            exec(
-                "SELECT * FROM %s /*+ OPTIONS('streaming'='true', 
'monitor-interval'='1s', 'start-tag'='%s', "
-                    + "'start-snapshot-id'='%d' )*/",
-                TABLE, tagName, startSnapshotId));
+    Assertions.assertThatThrownBy(
+            () ->
+                exec(
+                    "SELECT * FROM %s /*+ OPTIONS('streaming'='true', 
'monitor-interval'='1s', 'start-tag'='%s', "
+                        + "'start-snapshot-id'='%d' )*/",
+                    TABLE, tagName, startSnapshotId))
+        .isInstanceOf(IllegalArgumentException.class)
+        .hasMessageContaining("START_SNAPSHOT_ID and START_TAG cannot both be 
set.");

Review Comment:
   same as above



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