Skip to content

Commit

Permalink
Convert main integration tests into reusable backbox tests
Browse files Browse the repository at this point in the history
* Introduce new module: `integration-tests` to contain the test
  code for backbox integration tests

* Refactors existing main integration tests to avoid relying on
  Dropwizard internals.

* Add new test extension for managing the test environment with
  custom server managers discovered via `ServiceLoader`

* Use Dropwizard test extentions for the reference implementation
  of `PolarisServerManager`. Custom server builds can provide
  their own environment-specific implementations.

* Add helper classes for REST API (Management and Catalog)

* Run reusable tests by extending them in the DW module.
  Using test suites is also possible, but it only uses one
  gradle test worker, so test parallelism is reduced. At the
  same time running tests in parallel withing the same JVM using
  JUnit5 threads currently leads to errors.
  • Loading branch information
dimas-b committed Dec 27, 2024
1 parent 231dde7 commit 8b7325e
Show file tree
Hide file tree
Showing 43 changed files with 2,435 additions and 1,995 deletions.
3 changes: 3 additions & 0 deletions dropwizard/service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ dependencies {
compileOnly(libs.jakarta.annotation.api)
compileOnly(libs.spotbugs.annotations)

testImplementation(project(":polaris-tests"))
testImplementation(project(":polaris-api-management-model"))

testImplementation("org.apache.iceberg:iceberg-api:${libs.versions.iceberg.get()}:tests")
Expand Down Expand Up @@ -140,6 +141,8 @@ tasks.named<Test>("test").configure {
if (System.getenv("AWS_REGION") == null) {
environment("AWS_REGION", "us-west-2")
}
environment("POLARIS_BOOTSTRAP_POLARIS_ROOT_CLIENT_ID", "test-admin")
environment("POLARIS_BOOTSTRAP_POLARIS_ROOT_CLIENT_SECRET", "test-secret")
jvmArgs("--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED")
useJUnitPlatform()
maxParallelForks = 4
Expand Down

This file was deleted.

Loading

0 comments on commit 8b7325e

Please sign in to comment.