chenjunjiedada commented on a change in pull request #1101:
URL: https://github.com/apache/iceberg/pull/1101#discussion_r466413940
##########
File path: core/src/test/java/org/apache/iceberg/TestMergeAppend.java
##########
@@ -75,17 +85,30 @@ public void testEmptyTableAppendManifest() throws
IOException {
TableMetadata base = readMetadata();
Assert.assertNull("Should not have a current snapshot",
base.currentSnapshot());
+ Assert.assertEquals("Last sequence number should be 0", 0,
base.lastSequenceNumber());
ManifestFile manifest = writeManifest(FILE_A, FILE_B);
- Snapshot pending = table.newAppend()
+ table.newAppend()
.appendManifest(manifest)
- .apply();
+ .commit();
+
+ Snapshot committedSnapshot = table.currentSnapshot();
+ Assert.assertNotNull("Should create a snapshot", table.currentSnapshot());
+ V1Assert.assertEquals("Last sequence number should be 0", 0,
table.ops().current().lastSequenceNumber());
+ V2Assert.assertEquals("Last sequence number should be 1", 1,
table.ops().current().lastSequenceNumber());
- validateSnapshot(base.currentSnapshot(), pending, FILE_A, FILE_B);
+ validateSnapshot(base.currentSnapshot(), committedSnapshot, FILE_A,
FILE_B);
Review comment:
Not needed. Removed.
----------------------------------------------------------------
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]