openinx commented on a change in pull request #2042:
URL: https://github.com/apache/iceberg/pull/2042#discussion_r608295275
##########
File path:
flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergFilesCommitter.java
##########
@@ -140,6 +141,41 @@ public void testCommitTxnWithoutDataFiles() throws
Exception {
}
}
+ @Test
+ public void testEmptyCommits() throws Exception {
Review comment:
For this tests, it's good to simplify it as:
```java
@Test
public void testMaxContinuousEmptyCommits() throws Exception {
table.updateProperties()
.set(IcebergFilesCommitter.MAX_CONTINUOUS_EMPTY_COMMITS, "3")
.commit();
JobID jobId = new JobID();
long checkpointId = 0;
long timestamp = 0;
try (OneInputStreamOperatorTestHarness<WriteResult, Void> harness =
createStreamSink(jobId)) {
harness.setup();
harness.open();
assertSnapshotSize(0);
for (int i = 1; i <= 9; i++) {
harness.snapshot(++checkpointId, ++timestamp);
harness.notifyOfCompletedCheckpoint(checkpointId);
assertSnapshotSize(i / 3);
}
}
}
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]