nastra commented on code in PR #4509:
URL: https://github.com/apache/iceberg/pull/4509#discussion_r843505767
##########
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);
Review Comment:
maybe just change to `catalog = initCatalog(branch2)`
##########
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",
Review Comment:
can we rename this (and others) to something like
`metadataLocationOfCommit1`. Initially it wasn't clear that this refers to the
metadata location
##########
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();
Review Comment:
those `catalog.refresh()` calls can be 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.
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]