Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<jenkins.version>${jenkins.baseline}.3</jenkins.version>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
<spotless.check.skip>false</spotless.check.skip>
<ban-junit4-imports.skip>false</ban-junit4-imports.skip>
<hpi.bundledArtifacts>aopalliance-repackaged,hk2-api,hk2-locator,hk2-utils,jakarta.inject,jakarta.json,jakarta.json,jakarta.json-api,jakarta.json.bind-api,jakarta.validation-api,jakarta.ws.rs-api,javassist,jersey-apache-connector,jersey-client,jersey-common,jersey-container-servlet,jersey-container-servlet-core,jersey-entity-filtering,jersey-hk2,jersey-media-jaxb,jersey-media-json-binding,jersey-media-json-jackson,jersey-media-json-jettison,jersey-media-multipart,jersey-media-sse,jersey-server,jettison,mimepull,osgi-resource-locator,yasson</hpi.bundledArtifacts>
<hpi.strictBundledArtifacts>true</hpi.strictBundledArtifacts>
</properties>
Expand Down
18 changes: 9 additions & 9 deletions src/test/java/org/glassfish/jersey/JerseyTest.java
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
package org.glassfish.jersey;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

import java.net.URI;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import org.glassfish.jersey.client.ClientConfig;
import org.junit.Rule;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.RealJenkinsRule;
import org.jvnet.hudson.test.junit.jupiter.RealJenkinsExtension;

public class JerseyTest {
class JerseyTest {

@Rule
public RealJenkinsRule rr = new RealJenkinsRule();
@RegisterExtension
private final RealJenkinsExtension extension = new RealJenkinsExtension();

@Test
public void json() throws Throwable {
rr.then(JerseyTest::_json);
void json() throws Throwable {
extension.then(JerseyTest::_json);
}

private static void _json(JenkinsRule j) throws Exception {
Expand Down
25 changes: 16 additions & 9 deletions src/test/java/org/glassfish/jersey/RestEasyTest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.glassfish.jersey;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
Expand All @@ -11,18 +11,24 @@
import org.jboss.resteasy.client.jaxrs.ResteasyClient;
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;
import org.junit.Rule;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.TestExtension;
import org.jvnet.hudson.test.junit.jupiter.WithJenkins;

public class RestEasyTest {
@WithJenkins
class RestEasyTest {

@Rule
public JenkinsRule j = new JenkinsRule();
private JenkinsRule j;

@BeforeEach
void beforeEach(JenkinsRule rule) {
j = rule;
}

@Test
public void withoutJackson() throws Exception {
void withoutJackson() throws Exception {
ResteasyClientBuilder builder = new ResteasyClientBuilder();
final ResteasyClient resteasyClient = builder.connectionPoolSize(60).build();
final ResteasyWebTarget target = resteasyClient.target(j.getURL() + "jersey");
Expand All @@ -33,7 +39,7 @@ public void withoutJackson() throws Exception {
}

@Test
public void withJackson() throws Exception {
void withJackson() throws Exception {
ResteasyClientBuilder builder = new ResteasyClientBuilder();
final ResteasyClient resteasyClient =
builder.register(new JacksonFeature()).connectionPoolSize(60).build();
Expand All @@ -45,7 +51,7 @@ public void withJackson() throws Exception {
}

@Path("/employee")
public static interface EmployeeService {
public interface EmployeeService {

@GET
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
Expand All @@ -56,6 +62,7 @@ public static interface EmployeeService {
String getAtAsString(@QueryParam("q") String q);
}

@SuppressWarnings("unused")
@TestExtension
public static class RestEasyJerseyResource extends JerseyResource {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

import org.glassfish.jersey.client.JerseyClient;
import org.glassfish.jersey.client.JerseyClientBuilder;
import org.junit.Rule;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.RealJenkinsRule;
import org.jvnet.hudson.test.junit.jupiter.RealJenkinsExtension;

public class JacksonFeatureTest {
class JacksonFeatureTest {

@Rule
public RealJenkinsRule rr = new RealJenkinsRule();
@RegisterExtension
private final RealJenkinsExtension extension = new RealJenkinsExtension();

@Test
public void smokes() throws Throwable {
rr.then(JacksonFeatureTest::_smokes);
void smokes() throws Throwable {
extension.then(JacksonFeatureTest::_smokes);
}

private static void _smokes(JenkinsRule r) {
Expand Down