Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ tasks.named<RatTask>("rat").configure {

excludes.add("logs/**")
excludes.add("service/common/src/**/banner.txt")
excludes.add("quarkus/service/logs")

excludes.add("site/node_modules/**")
excludes.add("site/layouts/robots.txt")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import jakarta.ws.rs.client.Entity;
import jakarta.ws.rs.core.Response;
import java.io.IOException;
import java.nio.file.Path;
import java.time.Instant;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -54,6 +55,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.io.TempDir;
import org.slf4j.LoggerFactory;

@ExtendWith(PolarisIntegrationTestExtension.class)
Expand All @@ -70,6 +72,8 @@ public class PolarisSparkIntegrationTest {
private String catalogName;
private String externalCatalogName;

@TempDir public Path warehouseDir;

@BeforeAll
public static void setup() throws IOException {
s3Container.start();
Expand Down Expand Up @@ -183,6 +187,7 @@ private SparkSession.Builder withCatalog(SparkSession.Builder builder, String ca
.config(
String.format("spark.sql.catalog.%s", catalogName),
"org.apache.iceberg.spark.SparkCatalog")
.config("spark.sql.warehouse.dir", warehouseDir.toString())
.config(String.format("spark.sql.catalog.%s.type", catalogName), "rest")
.config(
String.format("spark.sql.catalog.%s.uri", catalogName),
Expand Down
18 changes: 16 additions & 2 deletions quarkus/service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ dependencies {

tasks.withType(Test::class.java).configureEach {
systemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager")
addSparkJvmOptions()
if (System.getenv("AWS_REGION") == null) {
environment("AWS_REGION", "us-west-2")
}
Expand All @@ -160,7 +159,22 @@ tasks.withType(Test::class.java).configureEach {

tasks.named<Test>("test").configure { maxParallelForks = 4 }

tasks.named<Test>("intTest").configure { maxParallelForks = 1 }
tasks.named<Test>("intTest").configure {
maxParallelForks = 1
val logsDir = project.layout.buildDirectory.get().asFile.resolve("logs")
// delete files from previous runs
doFirst {
// delete log files written by Polaris
logsDir.deleteRecursively()
// delete quarkus.log file (captured Polaris stdout/stderr)
project.layout.buildDirectory.get().asFile.resolve("quarkus.log").delete()
}
// This property is not honored in a per-profile application.properties file,
// so we need to set it here.
systemProperty("quarkus.log.file.path", logsDir.resolve("polaris.log").absolutePath)
// For Spark integration tests
addSparkJvmOptions()
}

/**
* Adds the JPMS options required for Spark to run on Java 17, taken from the
Expand Down
Loading