This is an automated email from the ASF dual-hosted git repository.
dimas pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new 89eb4cc8d Disable cloud storage tests that would use @TempDir (#3095)
89eb4cc8d is described below
commit 89eb4cc8defc00bd8ac7e7c549cdbfe0f4c2c9a4
Author: Tamas Mate <[email protected]>
AuthorDate: Fri Nov 21 20:37:23 2025 +0100
Disable cloud storage tests that would use @TempDir (#3095)
Disable tests from ViewCatalogTests for cloud storage integration tests
(S3, ADLS, GCS) that would otherwise use @TempDir. Since @TempDir internally
uses Paths.get, it cannot point to cloud storage paths. These tests remain
enabled for file-based integration tests.
---
...arisRestCatalogViewAdlsIntegrationTestBase.java | 28 ++++++++++++++++++++++
...larisRestCatalogViewGcsIntegrationTestBase.java | 28 ++++++++++++++++++++++
...olarisRestCatalogViewS3IntegrationTestBase.java | 28 ++++++++++++++++++++++
.../polaris/service/it/RestCatalogViewAdlsIT.java | 16 +------------
.../polaris/service/it/RestCatalogViewGcsIT.java | 16 +------------
.../polaris/service/it/RestCatalogViewS3IT.java | 16 +------------
6 files changed, 87 insertions(+), 45 deletions(-)
diff --git
a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewAdlsIntegrationTestBase.java
b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewAdlsIntegrationTestBase.java
index 36cc707ac..00ee4d3f5 100644
---
a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewAdlsIntegrationTestBase.java
+++
b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewAdlsIntegrationTestBase.java
@@ -19,10 +19,13 @@
package org.apache.polaris.service.it.test;
import com.google.common.base.Strings;
+import java.nio.file.Path;
import java.util.List;
import java.util.stream.Stream;
import org.apache.polaris.core.admin.model.AzureStorageConfigInfo;
import org.apache.polaris.core.admin.model.StorageConfigInfo;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.io.TempDir;
/** Runs PolarisRestCatalogViewIntegrationTest on Azure. */
public abstract class PolarisRestCatalogViewAdlsIntegrationTestBase
@@ -43,4 +46,29 @@ public abstract class
PolarisRestCatalogViewAdlsIntegrationTestBase
protected boolean shouldSkip() {
return Stream.of(BASE_LOCATION,
TENANT_ID).anyMatch(Strings::isNullOrEmpty);
}
+
+ /**
+ * Disable tests that use @TempDir from ViewCatalogTests (Iceberg base
class). These tests are
+ * disabled for now because they use @TempDir which internally goes through
Paths.get, and we
+ * cannot make it point to a cloud storage path at the moment.
+ */
+ @Disabled("Test uses @TempDir which cannot point to cloud storage paths")
+ @Override
+ public void completeCreateView() {}
+
+ @Disabled("Test uses @TempDir which cannot point to cloud storage paths")
+ @Override
+ public void createViewWithCustomMetadataLocation() {}
+
+ @Disabled("Test uses @TempDir which cannot point to cloud storage paths")
+ @Override
+ public void createAndReplaceViewWithLocation() {}
+
+ @Disabled("Test uses @TempDir which cannot point to cloud storage paths")
+ @Override
+ public void updateViewLocation() {}
+
+ @Disabled("Test uses @TempDir which cannot point to cloud storage paths")
+ @Override
+ public void createViewWithCustomMetadataLocationUsingPolaris(@TempDir Path
tempDir) {}
}
diff --git
a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewGcsIntegrationTestBase.java
b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewGcsIntegrationTestBase.java
index 7c32ec024..0bd8d69ab 100644
---
a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewGcsIntegrationTestBase.java
+++
b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewGcsIntegrationTestBase.java
@@ -19,10 +19,13 @@
package org.apache.polaris.service.it.test;
import com.google.common.base.Strings;
+import java.nio.file.Path;
import java.util.List;
import java.util.stream.Stream;
import org.apache.polaris.core.admin.model.GcpStorageConfigInfo;
import org.apache.polaris.core.admin.model.StorageConfigInfo;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.io.TempDir;
/** Runs PolarisRestCatalogViewIntegrationTest on GCP. */
public abstract class PolarisRestCatalogViewGcsIntegrationTestBase
@@ -44,4 +47,29 @@ public abstract class
PolarisRestCatalogViewGcsIntegrationTestBase
protected boolean shouldSkip() {
return Stream.of(BASE_LOCATION,
SERVICE_ACCOUNT).anyMatch(Strings::isNullOrEmpty);
}
+
+ /**
+ * Disable tests that use @TempDir from ViewCatalogTests (Iceberg base
class). These tests are
+ * disabled for now because they use @TempDir which internally goes through
Paths.get, and we
+ * cannot make it point to a cloud storage path at the moment.
+ */
+ @Disabled("Test uses @TempDir which cannot point to cloud storage paths")
+ @Override
+ public void completeCreateView() {}
+
+ @Disabled("Test uses @TempDir which cannot point to cloud storage paths")
+ @Override
+ public void createViewWithCustomMetadataLocation() {}
+
+ @Disabled("Test uses @TempDir which cannot point to cloud storage paths")
+ @Override
+ public void createAndReplaceViewWithLocation() {}
+
+ @Disabled("Test uses @TempDir which cannot point to cloud storage paths")
+ @Override
+ public void updateViewLocation() {}
+
+ @Disabled("Test uses @TempDir which cannot point to cloud storage paths")
+ @Override
+ public void createViewWithCustomMetadataLocationUsingPolaris(@TempDir Path
tempDir) {}
}
diff --git
a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewS3IntegrationTestBase.java
b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewS3IntegrationTestBase.java
index 496e7ebbe..69d105dbe 100644
---
a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewS3IntegrationTestBase.java
+++
b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewS3IntegrationTestBase.java
@@ -19,11 +19,14 @@
package org.apache.polaris.service.it.test;
import com.google.common.base.Strings;
+import java.nio.file.Path;
import java.util.List;
import java.util.Optional;
import java.util.stream.Stream;
import org.apache.polaris.core.admin.model.AwsStorageConfigInfo;
import org.apache.polaris.core.admin.model.StorageConfigInfo;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.io.TempDir;
/** Runs PolarisRestCatalogViewIntegrationTest on AWS. */
public abstract class PolarisRestCatalogViewS3IntegrationTestBase
@@ -46,4 +49,29 @@ public abstract class
PolarisRestCatalogViewS3IntegrationTestBase
protected boolean shouldSkip() {
return Stream.of(BASE_LOCATION, ROLE_ARN).anyMatch(Strings::isNullOrEmpty);
}
+
+ /**
+ * Disable tests that use @TempDir from ViewCatalogTests (Iceberg base
class). These tests are
+ * disabled for now because they use @TempDir which internally goes through
Paths.get, and we
+ * cannot make it point to a cloud storage path at the moment.
+ */
+ @Disabled("Test uses @TempDir which cannot point to cloud storage paths")
+ @Override
+ public void completeCreateView() {}
+
+ @Disabled("Test uses @TempDir which cannot point to cloud storage paths")
+ @Override
+ public void createViewWithCustomMetadataLocation() {}
+
+ @Disabled("Test uses @TempDir which cannot point to cloud storage paths")
+ @Override
+ public void createAndReplaceViewWithLocation() {}
+
+ @Disabled("Test uses @TempDir which cannot point to cloud storage paths")
+ @Override
+ public void updateViewLocation() {}
+
+ @Disabled("Test uses @TempDir which cannot point to cloud storage paths")
+ @Override
+ public void createViewWithCustomMetadataLocationUsingPolaris(@TempDir Path
tempDir) {}
}
diff --git
a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewAdlsIT.java
b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewAdlsIT.java
index ce57d43f5..b3980b252 100644
---
a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewAdlsIT.java
+++
b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewAdlsIT.java
@@ -19,23 +19,9 @@
package org.apache.polaris.service.it;
import io.quarkus.test.junit.QuarkusIntegrationTest;
-import java.lang.reflect.Field;
-import java.nio.file.Path;
-import org.apache.iceberg.view.ViewCatalogTests;
import
org.apache.polaris.service.it.test.PolarisRestCatalogViewAdlsIntegrationTestBase;
-import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
-import org.junit.jupiter.api.io.TempDir;
@QuarkusIntegrationTest
@EnabledIfEnvironmentVariable(named = "INTEGRATION_TEST_AZURE_PATH", matches =
".+")
-public class RestCatalogViewAdlsIT extends
PolarisRestCatalogViewAdlsIntegrationTestBase {
-
- @BeforeEach
- public void setUpTempDir(@TempDir Path tempDir) throws Exception {
- // see https://github.com/quarkusio/quarkus/issues/13261
- Field field = ViewCatalogTests.class.getDeclaredField("tempDir");
- field.setAccessible(true);
- field.set(this, tempDir);
- }
-}
+public class RestCatalogViewAdlsIT extends
PolarisRestCatalogViewAdlsIntegrationTestBase {}
diff --git
a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewGcsIT.java
b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewGcsIT.java
index 36c48b089..0b4b9def4 100644
---
a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewGcsIT.java
+++
b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewGcsIT.java
@@ -19,23 +19,9 @@
package org.apache.polaris.service.it;
import io.quarkus.test.junit.QuarkusIntegrationTest;
-import java.lang.reflect.Field;
-import java.nio.file.Path;
-import org.apache.iceberg.view.ViewCatalogTests;
import
org.apache.polaris.service.it.test.PolarisRestCatalogViewGcsIntegrationTestBase;
-import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
-import org.junit.jupiter.api.io.TempDir;
@QuarkusIntegrationTest
@EnabledIfEnvironmentVariable(named = "INTEGRATION_TEST_GCS_PATH", matches =
".+")
-public class RestCatalogViewGcsIT extends
PolarisRestCatalogViewGcsIntegrationTestBase {
-
- @BeforeEach
- public void setUpTempDir(@TempDir Path tempDir) throws Exception {
- // see https://github.com/quarkusio/quarkus/issues/13261
- Field field = ViewCatalogTests.class.getDeclaredField("tempDir");
- field.setAccessible(true);
- field.set(this, tempDir);
- }
-}
+public class RestCatalogViewGcsIT extends
PolarisRestCatalogViewGcsIntegrationTestBase {}
diff --git
a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewS3IT.java
b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewS3IT.java
index 65bc1e687..936bc1d48 100644
---
a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewS3IT.java
+++
b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewS3IT.java
@@ -19,23 +19,9 @@
package org.apache.polaris.service.it;
import io.quarkus.test.junit.QuarkusIntegrationTest;
-import java.lang.reflect.Field;
-import java.nio.file.Path;
-import org.apache.iceberg.view.ViewCatalogTests;
import
org.apache.polaris.service.it.test.PolarisRestCatalogViewS3IntegrationTestBase;
-import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
-import org.junit.jupiter.api.io.TempDir;
@QuarkusIntegrationTest
@EnabledIfEnvironmentVariable(named = "INTEGRATION_TEST_S3_PATH", matches =
".+")
-public class RestCatalogViewS3IT extends
PolarisRestCatalogViewS3IntegrationTestBase {
-
- @BeforeEach
- public void setUpTempDir(@TempDir Path tempDir) throws Exception {
- // see https://github.com/quarkusio/quarkus/issues/13261
- Field field = ViewCatalogTests.class.getDeclaredField("tempDir");
- field.setAccessible(true);
- field.set(this, tempDir);
- }
-}
+public class RestCatalogViewS3IT extends
PolarisRestCatalogViewS3IntegrationTestBase {}