nastra commented on code in PR #7481:
URL: https://github.com/apache/iceberg/pull/7481#discussion_r1182129831
##########
flink/v1.17/flink/src/test/java/org/apache/iceberg/flink/sink/TestFlinkIcebergSink.java:
##########
@@ -350,21 +345,16 @@ public void
testOverrideWriteConfigWithUnknownDistributionMode() {
.writeParallelism(parallelism)
.setAll(newProps);
- AssertHelpers.assertThrows(
- "Should fail with invalid distribution mode.",
- IllegalArgumentException.class,
- "Invalid distribution mode: UNRECOGNIZED",
- () -> {
- builder.append();
-
- // Execute the program.
- env.execute("Test Iceberg DataStream.");
- return null;
- });
+ Assertions.assertThatThrownBy(builder::append)
+ .isInstanceOf(IllegalArgumentException.class)
+ .hasMessage("Invalid distribution mode: UNRECOGNIZED");
+
+ // Execute the program.
+ env.execute("Test Iceberg DataStream.");
Review Comment:
I think we don't need to call this at all because the exception happens on
`builder::append` and we're only interested here about the detection of the
`UNRECOGNIZED` distribution mode. So we can just remove this line here and in
the test below
--
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]