-
Notifications
You must be signed in to change notification settings - Fork 403
Convert tests to com.sun.net.httpserver
#394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -5,7 +5,7 @@ | |||
<parent> | |||
<groupId>org.jenkins-ci.plugins</groupId> | |||
<artifactId>plugin</artifactId> | |||
<version>5.2</version> | |||
<version>5.9</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not strictly necessary for this PR, but taking advantage of the build/test cycle to update this plugin's metadata while I am here.
@@ -39,7 +39,7 @@ | |||
<connection>scm:git:https://github.com/${gitHubRepo}.git</connection> | |||
<developerConnection>scm:git:git@github.com:${gitHubRepo}.git</developerConnection> | |||
<url>https://github.com/${gitHubRepo}</url> | |||
<tag>v1.42.0</tag> | |||
<tag>${scmTag}</tag> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matching the archetype, and also needed to get an incremental build for testing.
@@ -52,7 +52,7 @@ | |||
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo> | |||
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ --> | |||
<jenkins.baseline>2.479</jenkins.baseline> | |||
<jenkins.version>${jenkins.baseline}.1</jenkins.version> | |||
<jenkins.version>${jenkins.baseline}.3</jenkins.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -206,7 +206,7 @@ | |||
<dependency> | |||
<groupId>io.jenkins.tools.bom</groupId> | |||
<artifactId>bom-${jenkins.baseline}.x</artifactId> | |||
<version>3559.vb_5b_81183b_d23</version> | |||
<version>4488.v7fe26526366e</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -96,7 +95,6 @@ public static Path getBaseCacheDir() { | |||
* | |||
* @param configs active server configs to exclude caches from cleanup | |||
*/ | |||
@SuppressFBWarnings(value = "RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was needed in a previous version of SpotBugs, but it is not needed in the very latest version of SpotBugs (pulled in via the latest plugin parent POM). The latest version actually complains about an unnecessary suppression, so remove it here to fix that warning.
import net.sf.json.JSONObject; | ||
import org.eclipse.jetty.server.Server; | ||
import org.eclipse.jetty.server.ServerConnector; | ||
import org.eclipse.jetty.ee9.servlet.DefaultServlet; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No more references to a specific EE version, making this test robust against future EE upgrades (including EE 10).
Thanks @KostyaSha! Could this please be released at some point? Eventually (not just yet, though), it will be needed for jenkinsci/bom#4779. |
just ping me and i'll do it |
Thanks @KostyaSha, from my perspective this is ready to release. |
you are welcome, done |
When testing this plugin against EE 10, I found the same test-only (not production) issues in
GitHubServerConfigIntegrationTest
as I did when testing this plugin against EE 9. Rather than continue to adapt this test for every EE version, this PR removes any references to Jetty or Jakarta EE from the test, making the test less fragile. In their place, we substitute references to standard Java Platform functionality.Testing done
mvn clean verify
with Java 21Submitter checklist