tsreaper commented on code in PR #428:
URL: https://github.com/apache/flink-table-store/pull/428#discussion_r1045481303


##########
flink-table-store-core/src/test/java/org/apache/flink/table/store/table/ChangelogWithKeyFileStoreTableTest.java:
##########
@@ -615,6 +618,79 @@ public void testIncrementalScanOverwrite() throws 
Exception {
                 .isNotEqualTo(splits0.get(0).files().get(0).fileName());
     }
 
+    @Test
+    public void testAuditLog() throws Exception {
+        FileStoreTable table =
+                createFileStoreTable(
+                        conf -> conf.set(CoreOptions.CHANGELOG_PRODUCER, 
ChangelogProducer.INPUT));
+        TableWrite write = table.newWrite(commitUser);
+        TableCommit commit = table.newCommit(commitUser);
+        write.write(rowDataWithKind(RowKind.INSERT, 1, 10, 100L));
+        write.write(rowDataWithKind(RowKind.INSERT, 2, 20, 200L));
+        commit.commit(0, write.prepareCommit(true, 0));
+
+        write = table.newWrite(commitUser);
+        commit = table.newCommit(commitUser);
+        write.write(rowDataWithKind(RowKind.UPDATE_AFTER, 1, 30, 300L));
+        commit.commit(1, write.prepareCommit(true, 1));

Review Comment:
   No need to create new write and commit. Also you need to close them before 
the test ends.



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

Reply via email to