Skip to content
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

Enable tests after jakartified media #4591

Merged
merged 1 commit into from
Oct 6, 2020
Merged
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
45 changes: 20 additions & 25 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,21 +188,16 @@
<artifactId>jersey-proxy-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-servlet-portability</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-spring4</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-spring5</artifactId>
<version>${project.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.glassfish.jersey.ext</groupId>-->
<!-- <artifactId>jersey-spring4</artifactId>-->
<!-- <version>${project.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.glassfish.jersey.ext</groupId>-->
<!-- <artifactId>jersey-spring5</artifactId>-->
<!-- <version>${project.version}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-declarative-linking</artifactId>
Expand Down Expand Up @@ -258,21 +253,21 @@
<artifactId>jersey-rx-client-rxjava2</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.ext.microprofile</groupId>
<artifactId>jersey-mp-rest-client</artifactId>
<version>${project.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.glassfish.jersey.ext.microprofile</groupId>-->
<!-- <artifactId>jersey-mp-rest-client</artifactId>-->
<!-- <version>${project.version}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-jaxb</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>${project.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.glassfish.jersey.media</groupId>-->
<!-- <artifactId>jersey-media-json-jackson</artifactId>-->
<!-- <version>${project.version}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jettison</artifactId>
Expand Down
12 changes: 6 additions & 6 deletions connectors/jetty-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.glassfish.jersey.media</groupId>-->
<!-- <artifactId>jersey-media-json-jackson</artifactId>-->
<!-- <version>${project.version}</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-jetty</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.jackson.JacksonFeature;
// import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;

Expand Down Expand Up @@ -103,15 +103,15 @@ public String toString() {

@Override
protected Application configure() {
ResourceConfig config = new ResourceConfig(EntityResource.class, JacksonFeature.class);
ResourceConfig config = new ResourceConfig(EntityResource.class/*, JacksonFeature.class*/);
config.register(new LoggingFeature(LOGGER, LoggingFeature.Verbosity.PAYLOAD_ANY));
return config;
}

@Override
protected void configureClient(ClientConfig config) {
config.connectorProvider(new JettyConnectorProvider())
.register(JacksonFeature.class);
config.connectorProvider(new JettyConnectorProvider());
//.register(/*JacksonFeature.class*/);
}

@Test
Expand Down
48 changes: 6 additions & 42 deletions core-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-osgi</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
Expand Down Expand Up @@ -231,48 +237,6 @@
</dependencies>

<profiles>
<profile>
<id>jdk11+</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-osgi</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>jdk8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<!-- TODO remove after jakartification -->
<configuration>
<excludes> <!--JDK 8 -->
<exclude>org/glassfish/jersey/server/filter/FilterSetMethodTest.java</exclude>
<exclude>org/glassfish/jersey/server/internal/inject/FormParamTest.java</exclude>
<exclude>org/glassfish/jersey/server/model/OptionsSubResourceMethodTest.java</exclude>
<exclude>org/glassfish/jersey/server/model/OptionsTest.java</exclude>
<exclude>org/glassfish/jersey/server/wadl/generators/resourcedoc/WadlGeneratorResourceDocSupportTest.java</exclude>
<exclude>org/glassfish/jersey/server/ExtendedResourceContextTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>securityOff</id>
<properties>
Expand Down
26 changes: 5 additions & 21 deletions examples/declarative-linking/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@
<artifactId>jakarta.el</artifactId>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-osgi</artifactId>
</dependency>

<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-moxy</artifactId>
Expand Down Expand Up @@ -82,31 +87,10 @@
<mainClass>org.glassfish.jersey.examples.linking.App</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>org/glassfish/jersey/examples/linking/LinkWebAppTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>jdk11+</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-osgi</artifactId>
</dependency>
</dependencies>
</profile>
<profile>
<id>pre-release</id>
<build>
Expand Down
16 changes: 5 additions & 11 deletions examples/entity-filtering-security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<artifactId>jersey-media-json-processing</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.glassfish.jersey.media</groupId>-->
<!-- <artifactId>jersey-media-json-jackson</artifactId>-->
<!-- </dependency>-->

<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
Expand All @@ -70,16 +74,6 @@
<mainClass>org.glassfish.jersey.examples.entityfiltering.security.App</mainClass>
</configuration>
</plugin>
<!-- TODO remove after jakartification is done -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/**/*.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import jakarta.ws.rs.ApplicationPath;

import org.glassfish.jersey.jackson.JacksonFeature;
// import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.message.filtering.SecurityEntityFilteringFeature;
import org.glassfish.jersey.moxy.json.MoxyJsonConfig;
import org.glassfish.jersey.server.ResourceConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import org.glassfish.jersey.examples.entityfiltering.security.domain.RestrictedEntity;
import org.glassfish.jersey.examples.entityfiltering.security.domain.RestrictedSubEntity;
import org.glassfish.jersey.jackson.JacksonFeature;
// import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.message.filtering.SecurityEntityFilteringFeature;
import org.glassfish.jersey.moxy.json.MoxyJsonFeature;
import org.glassfish.jersey.server.ResourceConfig;
Expand All @@ -42,7 +42,7 @@ public class RestrictedResourceTest extends JerseyTest {

@Parameterized.Parameters(name = "Provider: {0}")
public static Iterable<Class[]> providers() {
return Arrays.asList(new Class[][]{{MoxyJsonFeature.class}, {JacksonFeature.class}});
return Arrays.asList(new Class[][]{{MoxyJsonFeature.class}/*, {JacksonFeature.class}*/});
}

public RestrictedResourceTest(final Class<Feature> filteringProvider) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import org.glassfish.jersey.examples.entityfiltering.security.domain.RestrictedEntity;
import org.glassfish.jersey.examples.entityfiltering.security.domain.RestrictedSubEntity;
import org.glassfish.jersey.jackson.JacksonFeature;
// import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.message.filtering.SecurityEntityFilteringFeature;
import org.glassfish.jersey.moxy.json.MoxyJsonFeature;
import org.glassfish.jersey.server.ResourceConfig;
Expand All @@ -40,7 +40,7 @@ public class UnrestrictedResourceTest extends JerseyTest {

@Parameterized.Parameters(name = "Provider: {0}")
public static Iterable<Class[]> providers() {
return Arrays.asList(new Class[][]{{MoxyJsonFeature.class}, {JacksonFeature.class}});
return Arrays.asList(new Class[][]{{MoxyJsonFeature.class}/*, {JacksonFeature.class}*/});
}

public UnrestrictedResourceTest(final Class<Feature> filteringProvider) {
Expand Down
16 changes: 5 additions & 11 deletions examples/entity-filtering-selectable/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<artifactId>jersey-media-json-processing</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.glassfish.jersey.media</groupId>-->
<!-- <artifactId>jersey-media-json-jackson</artifactId>-->
<!-- </dependency>-->

<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
Expand All @@ -70,16 +74,6 @@
<mainClass>org.glassfish.jersey.examples.entityfiltering.selectable.App</mainClass>
</configuration>
</plugin>
<!-- TODO remove after jakartification is done -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>org/glassfish/jersey/examples/entityfiltering/selectable/PersonResourceTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import jakarta.ws.rs.ApplicationPath;

import org.glassfish.jersey.jackson.JacksonFeature;
// import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.message.filtering.SelectableEntityFilteringFeature;
import org.glassfish.jersey.moxy.json.MoxyJsonConfig;
import org.glassfish.jersey.server.ResourceConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.glassfish.jersey.examples.entityfiltering.selectable.domain.Person;
import org.glassfish.jersey.examples.entityfiltering.selectable.domain.PhoneNumber;
import org.glassfish.jersey.examples.entityfiltering.selectable.resource.PersonResource;
import org.glassfish.jersey.jackson.JacksonFeature;
// import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.message.filtering.SelectableEntityFilteringFeature;
import org.glassfish.jersey.moxy.json.MoxyJsonFeature;
import org.glassfish.jersey.server.ResourceConfig;
Expand All @@ -46,7 +46,7 @@ public class PersonResourceTest extends JerseyTest {

@Parameterized.Parameters(name = "Provider: {0}")
public static Iterable<Class[]> providers() {
return Arrays.asList(new Class[][]{{MoxyJsonFeature.class}, {JacksonFeature.class}});
return Arrays.asList(new Class[][]{{MoxyJsonFeature.class} /*, {JacksonFeature.class} */});
}

private final Class<Feature> filteringProvider;
Expand Down Expand Up @@ -94,12 +94,12 @@ public void testNoFilter() throws Exception {
assertThat(phoneNumbers, notNullValue());

// TODO: enable for MOXy as well when JERSEY-2751 gets fixed.
if (JacksonFeature.class.isAssignableFrom(filteringProvider)) {
phoneNumber = phoneNumbers.get("HOME");
assertThat(phoneNumber, notNullValue());
assertThat(phoneNumber.getAreaCode(), notNullValue());
assertThat(phoneNumber.getNumber(), notNullValue());
}
// if (JacksonFeature.class.isAssignableFrom(filteringProvider)) {
// phoneNumber = phoneNumbers.get("HOME");
// assertThat(phoneNumber, notNullValue());
// assertThat(phoneNumber.getAreaCode(), notNullValue());
// assertThat(phoneNumber.getNumber(), notNullValue());
// }
}

@Test
Expand Down
Loading