Skip to content

Commit

Permalink
Core: Fix REST catalog tests with default v2 tables (apache#8469)
Browse files Browse the repository at this point in the history
  • Loading branch information
rdblue authored Sep 3, 2023
1 parent 6ee5729 commit b9fc08c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 deletions.
4 changes: 3 additions & 1 deletion core/src/main/java/org/apache/iceberg/TableMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,9 @@ public Builder addSnapshot(Snapshot snapshot) {
snapshot.snapshotId());

ValidationException.check(
formatVersion == 1 || snapshot.sequenceNumber() > lastSequenceNumber,
formatVersion == 1
|| snapshot.sequenceNumber() > lastSequenceNumber
|| snapshot.parentId() == null,
"Cannot add snapshot with sequence number %s older than last sequence number %s",
snapshot.sequenceNumber(),
lastSequenceNumber);
Expand Down
22 changes: 0 additions & 22 deletions core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
import org.apache.iceberg.relocated.com.google.common.collect.Maps;
import org.apache.iceberg.relocated.com.google.common.collect.Sets;
import org.apache.iceberg.relocated.com.google.common.collect.Streams;
import org.apache.iceberg.rest.RESTCatalog;
import org.apache.iceberg.types.Types;
import org.apache.iceberg.util.CharSequenceSet;
import org.assertj.core.api.Assertions;
Expand Down Expand Up @@ -2183,9 +2182,6 @@ public void testReplaceTransactionRequiresTableExists() {
public void testConcurrentReplaceTransactions() {
C catalog = catalog();

// TODO: temporarily ignore this test for REST catalogs (issue #8390)
Assumptions.assumeFalse(catalog instanceof RESTCatalog);

if (requiresNamespaceCreate()) {
catalog.createNamespace(NS);
}
Expand Down Expand Up @@ -2237,9 +2233,6 @@ public void testConcurrentReplaceTransactions() {
public void testConcurrentReplaceTransactionSchema() {
C catalog = catalog();

// TODO: temporarily ignore this test for REST catalogs (issue #8390)
Assumptions.assumeFalse(catalog instanceof RESTCatalog);

if (requiresNamespaceCreate()) {
catalog.createNamespace(NS);
}
Expand Down Expand Up @@ -2279,9 +2272,6 @@ public void testConcurrentReplaceTransactionSchema() {
public void testConcurrentReplaceTransactionSchema2() {
C catalog = catalog();

// TODO: temporarily ignore this test for REST catalogs (issue #8390)
Assumptions.assumeFalse(catalog instanceof RESTCatalog);

if (requiresNamespaceCreate()) {
catalog.createNamespace(NS);
}
Expand Down Expand Up @@ -2361,9 +2351,6 @@ public void testConcurrentReplaceTransactionSchemaConflict() {
public void testConcurrentReplaceTransactionPartitionSpec() {
C catalog = catalog();

// TODO: temporarily ignore this test for REST catalogs (issue #8390)
Assumptions.assumeFalse(catalog instanceof RESTCatalog);

if (requiresNamespaceCreate()) {
catalog.createNamespace(NS);
}
Expand Down Expand Up @@ -2404,9 +2391,6 @@ public void testConcurrentReplaceTransactionPartitionSpec() {
public void testConcurrentReplaceTransactionPartitionSpec2() {
C catalog = catalog();

// TODO: temporarily ignore this test for REST catalogs (issue #8390)
Assumptions.assumeFalse(catalog instanceof RESTCatalog);

if (requiresNamespaceCreate()) {
catalog.createNamespace(NS);
}
Expand Down Expand Up @@ -2487,9 +2471,6 @@ public void testConcurrentReplaceTransactionPartitionSpecConflict() {
public void testConcurrentReplaceTransactionSortOrder() {
C catalog = catalog();

// TODO: temporarily ignore this test for REST catalogs (issue #8390)
Assumptions.assumeFalse(catalog instanceof RESTCatalog);

if (requiresNamespaceCreate()) {
catalog.createNamespace(NS);
}
Expand Down Expand Up @@ -2530,9 +2511,6 @@ public void testConcurrentReplaceTransactionSortOrder() {
public void testConcurrentReplaceTransactionSortOrderConflict() {
C catalog = catalog();

// TODO: temporarily ignore this test for REST catalogs (issue #8390)
Assumptions.assumeFalse(catalog instanceof RESTCatalog);

if (requiresNamespaceCreate()) {
catalog.createNamespace(NS);
}
Expand Down

0 comments on commit b9fc08c

Please sign in to comment.