rdblue commented on a change in pull request #3998:
URL: https://github.com/apache/iceberg/pull/3998#discussion_r819777708



##########
File path: 
flink/v1.14/flink/src/test/java/org/apache/iceberg/flink/sink/TestFlinkIcebergSink.java
##########
@@ -326,4 +327,51 @@ public void testTwoSinksInDisjointedDAG() throws Exception 
{
     Assert.assertEquals("rightTable", 
rightTable.currentSnapshot().summary().get("direction"));
   }
 
+  @Test
+  public void testOverrideWriteConfigWithUnknownDistributionMode() {
+    AssertHelpers.assertThrows("Override write configuration.",
+            RuntimeException.class, "No enum constant 
org.apache.iceberg.DistributionMode.UNRECOGNIZED",
+            () -> {
+              Map<String, String> newProps = Maps.newHashMap();
+              newProps.put(TableProperties.WRITE_DISTRIBUTION_MODE, 
"UNRECOGNIZED");
+
+              List<Row> rows = createRows("");
+              DataStream<Row> dataStream = 
env.addSource(createBoundedSource(rows), ROW_TYPE_INFO);
+
+              FlinkSink.forRow(dataStream, SimpleDataUtil.FLINK_SCHEMA)
+                      .table(table)
+                      .tableLoader(tableLoader)
+                      .writeParallelism(parallelism)
+                      .properties(newProps)
+                      .append();
+
+              // Execute the program.
+              env.execute("Test Iceberg DataStream.");
+              return null;
+            });
+  }
+
+  @Test
+  public void testOverrideWriteConfigWithUnknownFileFormat() {

Review comment:
       Mostly the same comments for this test 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