This is an automated email from the ASF dual-hosted git repository.

snazy 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 d2f2ff30 Make `@QuarkusIntegrationTest`s also work with Java 23 (#803)
d2f2ff30 is described below

commit d2f2ff307d2d20007df6e0f66bc27090b4240ce0
Author: Robert Stupp <[email protected]>
AuthorDate: Thu Jan 16 16:10:57 2025 +0100

    Make `@QuarkusIntegrationTest`s also work with Java 23 (#803)
    
    This is basically the same issue as #723, just via 
`@QuarkusIntegrationTest`s, which spawn a separate process. The (JVM) arguments 
for this need to be specified in a different way.
    
    This also simplifies the Quarksu service build file a little.
---
 quarkus/service/build.gradle.kts                      | 19 +++----------------
 .../service/src/main/resources/application.properties |  3 +++
 2 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/quarkus/service/build.gradle.kts b/quarkus/service/build.gradle.kts
index ee392615..50108700 100644
--- a/quarkus/service/build.gradle.kts
+++ b/quarkus/service/build.gradle.kts
@@ -146,9 +146,6 @@ dependencies {
 tasks.withType(Test::class.java).configureEach {
   systemProperty("java.util.logging.manager", 
"org.jboss.logmanager.LogManager")
   addSparkJvmOptions()
-}
-
-tasks.named<Test>("test").configure {
   if (System.getenv("AWS_REGION") == null) {
     environment("AWS_REGION", "us-west-2")
   }
@@ -158,21 +155,11 @@ tasks.named<Test>("test").configure {
   // Need to allow a java security manager after Java 21, for 
Subject.getSubject to work
   // "getSubject is supported only if a security manager is allowed".
   systemProperty("java.security.manager", "allow")
-  maxParallelForks = 4
 }
 
-tasks.named<Test>("intTest").configure {
-  if (System.getenv("AWS_REGION") == null) {
-    environment("AWS_REGION", "us-west-2")
-  }
-  // Note: the test secrets are referenced in DropwizardServerManager
-  environment("POLARIS_BOOTSTRAP_CREDENTIALS", 
"POLARIS,root,test-admin,test-secret")
-  jvmArgs("--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED")
-  // Need to allow a java security manager after Java 21, for 
Subject.getSubject to work
-  // "getSubject is supported only if a security manager is allowed".
-  systemProperty("java.security.manager", "allow")
-  maxParallelForks = 1
-}
+tasks.named<Test>("test").configure { maxParallelForks = 4 }
+
+tasks.named<Test>("intTest").configure { maxParallelForks = 1 }
 
 /**
  * Adds the JPMS options required for Spark to run on Java 17, taken from the
diff --git a/quarkus/service/src/main/resources/application.properties 
b/quarkus/service/src/main/resources/application.properties
index d601ef17..cdb20190 100644
--- a/quarkus/service/src/main/resources/application.properties
+++ b/quarkus/service/src/main/resources/application.properties
@@ -147,3 +147,6 @@ 
polaris.authentication.token-broker.max-token-generation=PT1H
 %test.polaris.storage.aws.secret-key=secretKey
 %test.polaris.storage.gcp.token=token
 %test.polaris.storage.gcp.lifespan=PT1H
+# Need to allow a java security manager after Java 21, for Subject.getSubject 
to work
+# "getSubject is supported only if a security manager is allowed".
+%test.quarkus.test.argLine=-Djava.security.manager=allow

Reply via email to