Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b26111d

Browse files
committedJan 16, 2025
Make @QuarkusIntegrationTests also work with Java 23
This is basically the same issue as apache#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.
1 parent 8682859 commit b26111d

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed
 

‎quarkus/service/build.gradle.kts

+3-16
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,6 @@ dependencies {
146146
tasks.withType(Test::class.java).configureEach {
147147
systemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager")
148148
addSparkJvmOptions()
149-
}
150-
151-
tasks.named<Test>("test").configure {
152149
if (System.getenv("AWS_REGION") == null) {
153150
environment("AWS_REGION", "us-west-2")
154151
}
@@ -158,21 +155,11 @@ tasks.named<Test>("test").configure {
158155
// Need to allow a java security manager after Java 21, for Subject.getSubject to work
159156
// "getSubject is supported only if a security manager is allowed".
160157
systemProperty("java.security.manager", "allow")
161-
maxParallelForks = 4
162158
}
163159

164-
tasks.named<Test>("intTest").configure {
165-
if (System.getenv("AWS_REGION") == null) {
166-
environment("AWS_REGION", "us-west-2")
167-
}
168-
// Note: the test secrets are referenced in DropwizardServerManager
169-
environment("POLARIS_BOOTSTRAP_CREDENTIALS", "POLARIS,root,test-admin,test-secret")
170-
jvmArgs("--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED")
171-
// Need to allow a java security manager after Java 21, for Subject.getSubject to work
172-
// "getSubject is supported only if a security manager is allowed".
173-
systemProperty("java.security.manager", "allow")
174-
maxParallelForks = 1
175-
}
160+
tasks.named<Test>("test").configure { maxParallelForks = 4 }
161+
162+
tasks.named<Test>("intTest").configure { maxParallelForks = 1 }
176163

177164
/**
178165
* Adds the JPMS options required for Spark to run on Java 17, taken from the

‎quarkus/service/src/main/resources/application.properties

+3
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,6 @@ polaris.authentication.token-broker.max-token-generation=PT1H
147147
%test.polaris.storage.aws.secret-key=secretKey
148148
%test.polaris.storage.gcp.token=token
149149
%test.polaris.storage.gcp.lifespan=PT1H
150+
# Need to allow a java security manager after Java 21, for Subject.getSubject to work
151+
# "getSubject is supported only if a security manager is allowed".
152+
%test.quarkus.test.argLine=-Djava.security.manager=allow

0 commit comments

Comments
 (0)
Please sign in to comment.