rdblue commented on code in PR #6074:
URL: https://github.com/apache/iceberg/pull/6074#discussion_r1084406483


##########
core/src/test/java/org/apache/iceberg/TestSnapshotManager.java:
##########
@@ -632,4 +632,82 @@ public void testAttemptToRollbackToCurrentSnapshot() {
     long currentSnapshotId = table.currentSnapshot().snapshotId();
     table.manageSnapshots().rollbackTo(currentSnapshotId).commit();
   }
+
+  @Test
+  public void testSnapshotManagerThroughTransaction() {
+    table.newAppend().appendFile(FILE_A).commit();
+    Snapshot snapshotAfterFirstAppend = readMetadata().currentSnapshot();
+    validateSnapshot(null, snapshotAfterFirstAppend, FILE_A);
+
+    table.newAppend().appendFile(FILE_B).commit();
+    validateSnapshot(snapshotAfterFirstAppend, 
readMetadata().currentSnapshot(), FILE_B);
+    Assert.assertEquals("Table should be on version 2 after appending twice", 
2, (int) version());

Review Comment:
   Why is this assertion here? The table version should not matter to this test.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to