Skip to content

Commit

Permalink
Issue #10606 - Bump build to JDK 21 (#10607)
Browse files Browse the repository at this point in the history
* Issue #10606 - Bump build to JDK 21
* Fix tests that fail on JDK 21
* better use of `@EnabledForJreRange`
* Disable JAASLdapLoginServiceTest on JDK 20+ via maven profile

Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
Co-authored-by: Olivier Lamy <[email protected]>
Co-authored-by: Simone Bordet <[email protected]>
  • Loading branch information
3 people authored Sep 28, 2023
1 parent 551ad8b commit 1e1bc5a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ pipeline {
stages {
stage("Parallel Stage") {
parallel {
stage("Build / Test - JDK19") {
stage("Build / Test - JDK21") {
agent { node { label 'linux' } }
steps {
timeout( time: 180, unit: 'MINUTES' ) {
checkout scm
mavenBuild( "jdk19", "clean install -Dspotbugs.skip=true -Djacoco.skip=true", "maven3")
recordIssues id: "jdk19", name: "Static Analysis jdk19", aggregatingResults: true, enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle()]
mavenBuild( "jdk21", "clean install -Dspotbugs.skip=true -Djacoco.skip=true", "maven3")
recordIssues id: "jdk21", name: "Static Analysis jdk21", aggregatingResults: true, enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle()]
}
}
}
Expand Down
22 changes: 22 additions & 0 deletions jetty-jaas/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,28 @@
</pluginManagement>
</build>
</profile>
<profile>
<id>jdk20</id>
<activation>
<jdk>[20,)</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<!-- sun.security.x509.X509CertInfo.set not present in Java 20, needs a Java 20 compatible version of Apache Directory Server -->
<exclude>**/JAASLdapLoginServiceTest*</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.UserIdentity;
import org.junit.Test;
import org.junit.jupiter.api.condition.EnabledForJreRange;
import org.junit.jupiter.api.condition.JRE;
import org.junit.runner.RunWith;

import static org.junit.Assert.assertFalse;
Expand All @@ -41,6 +43,7 @@
/**
* JAASLdapLoginServiceTest
*/
@EnabledForJreRange(max = JRE.JAVA_17, disabledReason = "sun.security.x509.X509CertInfo.set not present in Java 21, needs a Java 21 compatible version of Apache Directory Server")
@RunWith(FrameworkRunner.class)
@CreateLdapServer(transports = {@CreateTransport(protocol = "LDAP")})
@CreateDS(allowAnonAccess = false, partitions = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ public void testDryRunProperties() throws Exception
}

@Test
@DisabledForJreRange(max = JRE.JAVA_18)
@EnabledForJreRange(min = JRE.JAVA_19, max = JRE.JAVA_20)
public void testVirtualThreadPoolPreview() throws Exception
{
String jettyVersion = System.getProperty("jettyVersion");
Expand Down

0 comments on commit 1e1bc5a

Please sign in to comment.