Skip to content

Commit 041a362

Browse files
committed
fix another test
1 parent 8fda2da commit 041a362

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

quarkus/service/src/test/java/org/apache/polaris/service/quarkus/catalog/IcebergCatalogTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,8 +1695,8 @@ public void testFileIOWrapper() {
16951695

16961696
table.updateProperties().set("foo", "bar").commit();
16971697
Assertions.assertThat(measured.getInputBytes())
1698-
.as("A table was read and written")
1699-
.isGreaterThan(0);
1698+
.as("A table was read and written, but no trip to storage was made")
1699+
.isEqualTo(0);
17001700

17011701
Assertions.assertThat(catalog.dropTable(TABLE)).as("Table deletion should succeed").isTrue();
17021702
TaskEntity taskEntity =
@@ -1860,7 +1860,7 @@ public void testTableOperationsDoesNotRefreshAfterCommit(boolean updateMetadataO
18601860
IcebergCatalog.BasePolarisTableOperations ops = Mockito.spy(realOps);
18611861

18621862
try (MockedStatic<TableMetadataParser> mocked =
1863-
Mockito.mockStatic(TableMetadataParser.class, Mockito.CALLS_REAL_METHODS)) {
1863+
Mockito.mockStatic(TableMetadataParser.class, Mockito.CALLS_REAL_METHODS)) {
18641864
TableMetadata base1 = ops.current();
18651865
mocked.verify(
18661866
() -> TableMetadataParser.read(Mockito.any(), Mockito.anyString()), Mockito.times(1));

service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,11 +1495,11 @@ public void doCommit(TableMetadata base, TableMetadata metadata) {
14951495

14961496
// We diverge from `BaseMetastoreTableOperations` in the below code block
14971497
if (updateMetadataOnCommit) {
1498-
currentMetadata = TableMetadata
1499-
.buildFrom(metadata)
1500-
.withMetadataLocation(newLocation)
1501-
.discardChanges()
1502-
.build();
1498+
currentMetadata =
1499+
TableMetadata.buildFrom(metadata)
1500+
.withMetadataLocation(newLocation)
1501+
.discardChanges()
1502+
.build();
15031503
currentMetadataLocation = newLocation;
15041504
}
15051505

0 commit comments

Comments
 (0)