ConeyLiu commented on code in PR #7171:
URL: https://github.com/apache/iceberg/pull/7171#discussion_r1196358788
##########
flink/v1.16/flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergFilesCommitter.java:
##########
@@ -877,6 +887,130 @@ public void testCommitTwoCheckpointsInSingleTxn() throws
Exception {
}
}
+ @Test
+ public void testSpecEvolution() throws Exception {
+ long timestamp = 0;
+ int checkpointId = 0;
+ List<RowData> rows = Lists.newArrayList();
+ JobID jobId = new JobID();
+
+ OperatorID operatorId;
+ OperatorSubtaskState snapshot;
+ DataFile dataFile;
+ int specId;
+
+ try (OneInputStreamOperatorTestHarness<WriteResult, Void> harness =
createStreamSink(jobId)) {
+ harness.setup();
+ harness.open();
+ operatorId = harness.getOperator().getOperatorID();
+
+ assertSnapshotSize(0);
+
+ checkpointId++;
+ RowData rowData = SimpleDataUtil.createRowData(checkpointId, "hello" +
checkpointId);
+ // table unpartitioned
+ dataFile = writeDataFile("data-" + checkpointId,
ImmutableList.of(rowData));
+ harness.processElement(of(dataFile), ++timestamp);
+ rows.add(rowData);
+ harness.snapshot(checkpointId, ++timestamp);
+
+ specId =
+
getStagingManifestSpecId(harness.getOperator().getOperatorStateBackend(),
checkpointId);
+ Assert.assertEquals(
Review Comment:
OK, updated with assertj style.
--
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]