nastra commented on code in PR #4509:
URL: https://github.com/apache/iceberg/pull/4509#discussion_r843507101


##########
nessie/src/test/java/org/apache/iceberg/nessie/TestBranchVisibility.java:
##########
@@ -173,6 +174,33 @@ public void testSchemaSnapshot() throws Exception {
     
Assertions.assertThat(metadataOn2).isNotEqualTo(metadataOnTest).isNotEqualTo(metadataOnTest2);
   }
 
+  @Test
+  public void testMetadataLocationWithRefresh() throws Exception {
+    String branch1 = "test";
+    String branch2 = "branch-2";
+
+    // commit on tableIdentifier1 on branch1
+    NessieCatalog catalog = initCatalog(branch1);
+    String metadataCommit1 = addRow(catalog, tableIdentifier1, "initial-data",
+        ImmutableMap.of("id0", 4L));
+    catalog.refresh();
+
+    createBranch(branch2, catalog.currentHash(), branch1);
+    // commit on tableIdentifier1 on branch2
+    NessieCatalog catalogBranch1 = initCatalog(branch2);
+    String metadataCommit2 = addRow(catalogBranch1, tableIdentifier1, 
"some-more-data",
+        ImmutableMap.of("id0", 42L));
+    Assertions.assertThat(metadataCommit2).isNotEqualTo(metadataCommit1);
+
+    catalog = initCatalog(branch1);
+    catalog.refresh();
+    // load tableIdentifier1 on branch1
+    BaseTable table = (BaseTable)catalog.loadTable(tableIdentifier1);

Review Comment:
   nit: formatting



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

Reply via email to