fsk119 commented on a change in pull request #12712:
URL: https://github.com/apache/flink/pull/12712#discussion_r442901891



##########
File path: 
flink-connectors/flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/internal/JdbcTableOutputFormatTest.java
##########
@@ -64,6 +64,19 @@ public void setup() {
                keyFields = new String[]{"id"};
        }
 
+       @Test
+       public void testUpsertFormatCloseBeforeOpen() throws Exception{
+               JdbcOptions options = JdbcOptions.builder()
+                       .setDBUrl(getDbMetadata().getUrl())
+                       .setTableName(OUTPUT_TABLE)
+                       .build();
+               JdbcDmlOptions dmlOptions = JdbcDmlOptions.builder()
+                       
.withTableName(options.getTableName()).withDialect(options.getDialect())
+                       
.withFieldNames(fieldNames).withKeyFields(keyFields).build();
+               format = new TableJdbcUpsertOutputFormat(new 
SimpleJdbcConnectionProvider(options), dmlOptions, 
JdbcExecutionOptions.defaults());
+               format.close();

Review comment:
       Ok. I will fix it.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to