Skip to content

Commit 5b15428

Browse files
jansupolsenivam
authored andcommitted
Split MP REST Client integration test module to support javax.servlet in the TCK
Signed-off-by: jansupol <[email protected]>
1 parent 87beb01 commit 5b15428

File tree

16 files changed

+316
-238
lines changed

16 files changed

+316
-238
lines changed

ext/microprofile/mp-rest-client/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
<groupId>org.eclipse.microprofile.rest.client</groupId>
3434
<artifactId>microprofile-rest-client-api</artifactId>
3535
<version>3.0-RC3</version>
36+
<exclusions>
37+
<exclusion>
38+
<groupId>org.testng</groupId>
39+
<artifactId>testng</artifactId>
40+
</exclusion>
41+
</exclusions>
3642
</dependency>
3743
<dependency>
3844
<groupId>org.eclipse.microprofile.config</groupId>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2021 Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,11 +16,11 @@
1616

1717
package org.glassfish.jersey.microprofile.restclient;
1818

19-
import java.util.Arrays;
19+
import org.junit.Test;
2020

21-
import org.testng.annotations.Test;
21+
import java.util.Arrays;
2222

23-
import static org.testng.Assert.assertEquals;
23+
import static org.junit.Assert.assertEquals;
2424

2525
public class InterfaceUtilTest {
2626

tests/integration/microprofile/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<modules>
3434
<module>config</module>
3535
<module>rest-client</module>
36+
<module>rest-client-tck</module>
3637
</modules>
3738

3839
<build>
Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
5+
6+
This program and the accompanying materials are made available under the
7+
terms of the Eclipse Public License v. 2.0, which is available at
8+
http://www.eclipse.org/legal/epl-2.0.
9+
10+
This Source Code may also be made available under the following Secondary
11+
Licenses when the conditions for such availability set forth in the
12+
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
13+
version 2 with the GNU Classpath Exception, which is available at
14+
https://www.gnu.org/software/classpath/license.html.
15+
16+
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
17+
18+
-->
19+
20+
<project xmlns="http://maven.apache.org/POM/4.0.0"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23+
<parent>
24+
<artifactId>microprofile-integration-project</artifactId>
25+
<groupId>org.glassfish.jersey.tests.integration.microprofile</groupId>
26+
<version>3.1.0-SNAPSHOT</version>
27+
</parent>
28+
<modelVersion>4.0.0</modelVersion>
29+
30+
<artifactId>jersey-rest-client-tck</artifactId>
31+
32+
<dependencies>
33+
<dependency>
34+
<groupId>org.glassfish.jersey.ext.microprofile</groupId>
35+
<artifactId>jersey-mp-rest-client</artifactId>
36+
<version>${project.version}</version>
37+
<scope>test</scope>
38+
</dependency>
39+
<!-- Overrides CDI from parent pom -->
40+
<dependency>
41+
<groupId>jakarta.enterprise</groupId>
42+
<artifactId>jakarta.enterprise.cdi-api</artifactId>
43+
</dependency>
44+
<dependency>
45+
<groupId>jakarta.ejb</groupId>
46+
<artifactId>jakarta.ejb-api</artifactId>
47+
</dependency>
48+
<dependency>
49+
<groupId>org.jboss.weld.se</groupId>
50+
<artifactId>weld-se-core</artifactId>
51+
<scope>test</scope>
52+
</dependency>
53+
<dependency>
54+
<groupId>javax.servlet</groupId>
55+
<artifactId>javax.servlet-api</artifactId>
56+
<version>4.0.1</version>
57+
</dependency>
58+
<dependency>
59+
<groupId>io.smallrye</groupId>
60+
<artifactId>smallrye-config</artifactId>
61+
<version>1.3.6</version>
62+
<scope>test</scope>
63+
<exclusions>
64+
<exclusion>
65+
<groupId>javax.enterprise</groupId>
66+
<artifactId>cdi-api</artifactId>
67+
</exclusion>
68+
</exclusions>
69+
</dependency>
70+
<dependency>
71+
<groupId>org.eclipse.microprofile.rest.client</groupId>
72+
<artifactId>microprofile-rest-client-tck</artifactId>
73+
<version>3.0-RC3</version>
74+
<scope>test</scope>
75+
</dependency>
76+
<dependency>
77+
<groupId>org.testng</groupId>
78+
<artifactId>testng</artifactId>
79+
<scope>test</scope>
80+
</dependency>
81+
<dependency>
82+
<groupId>com.github.tomakehurst</groupId>
83+
<artifactId>wiremock</artifactId>
84+
<version>2.27.2</version>
85+
<scope>test</scope>
86+
<exclusions>
87+
<exclusion>
88+
<groupId>org.eclipse.jetty</groupId>
89+
<artifactId>jetty-server</artifactId>
90+
</exclusion>
91+
<exclusion>
92+
<groupId>org.eclipse.jetty</groupId>
93+
<artifactId>jetty-servlet</artifactId>
94+
</exclusion>
95+
<exclusion>
96+
<groupId>org.eclipse.jetty</groupId>
97+
<artifactId>jetty-servlets</artifactId>
98+
</exclusion>
99+
<exclusion>
100+
<groupId>org.eclipse.jetty</groupId>
101+
<artifactId>jetty-webapp</artifactId>
102+
</exclusion>
103+
<exclusion>
104+
<groupId>org.eclipse.jetty</groupId>
105+
<artifactId>jetty-proxy</artifactId>
106+
</exclusion>
107+
</exclusions>
108+
</dependency>
109+
<dependency>
110+
<groupId>com.google.guava</groupId>
111+
<artifactId>guava</artifactId>
112+
<version>20.0</version>
113+
</dependency>
114+
<dependency>
115+
<groupId>org.eclipse.jetty</groupId>
116+
<artifactId>jetty-server</artifactId>
117+
<version>${jetty.version}</version>
118+
<scope>test</scope>
119+
</dependency>
120+
<dependency>
121+
<groupId>org.eclipse.jetty</groupId>
122+
<artifactId>jetty-servlet</artifactId>
123+
<version>${jetty.version}</version>
124+
<scope>test</scope>
125+
</dependency>
126+
<dependency>
127+
<groupId>org.eclipse.jetty</groupId>
128+
<artifactId>jetty-servlets</artifactId>
129+
<version>${jetty.version}</version>
130+
<scope>test</scope>
131+
</dependency>
132+
<dependency>
133+
<groupId>org.eclipse.jetty</groupId>
134+
<artifactId>jetty-webapp</artifactId>
135+
<version>${jetty.version}</version>
136+
<scope>test</scope>
137+
</dependency>
138+
<dependency>
139+
<groupId>org.eclipse.jetty</groupId>
140+
<artifactId>jetty-proxy</artifactId>
141+
<version>${jetty.version}</version>
142+
<scope>test</scope>
143+
</dependency>
144+
<dependency>
145+
<groupId>org.jboss.arquillian.testng</groupId>
146+
<artifactId>arquillian-testng-container</artifactId>
147+
<version>1.7.0.Alpha10</version>
148+
<scope>test</scope>
149+
</dependency>
150+
<dependency>
151+
<groupId>org.jboss.arquillian.container</groupId>
152+
<artifactId>arquillian-container-test-spi</artifactId>
153+
<version>1.7.0.Alpha10</version>
154+
<scope>test</scope>
155+
</dependency>
156+
<dependency>
157+
<groupId>org.jboss.arquillian.container</groupId>
158+
<artifactId>arquillian-weld-embedded</artifactId>
159+
<version>3.0.0.Final</version>
160+
<scope>test</scope>
161+
</dependency>
162+
<dependency>
163+
<groupId>org.glassfish.jersey.test-framework</groupId>
164+
<artifactId>jersey-test-framework-core</artifactId>
165+
<scope>test</scope>
166+
</dependency>
167+
<dependency>
168+
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
169+
<artifactId>jersey-test-framework-provider-bundle</artifactId>
170+
<type>pom</type>
171+
<scope>test</scope>
172+
</dependency>
173+
<dependency>
174+
<groupId>org.glassfish.jersey.connectors</groupId>
175+
<artifactId>jersey-apache-connector</artifactId>
176+
<scope>test</scope>
177+
</dependency>
178+
<dependency>
179+
<groupId>org.glassfish.jersey.ext.cdi</groupId>
180+
<artifactId>jersey-weld2-se</artifactId>
181+
<scope>test</scope>
182+
</dependency>
183+
</dependencies>
184+
185+
<profiles>
186+
<profile>
187+
<id>testRunner</id>
188+
<activation>
189+
<property>
190+
<name>skipTests</name>
191+
<value>!true</value>
192+
</property>
193+
</activation>
194+
<build>
195+
<plugins>
196+
<plugin>
197+
<groupId>org.apache.maven.plugins</groupId>
198+
<artifactId>maven-surefire-plugin</artifactId>
199+
<dependencies>
200+
<dependency>
201+
<groupId>org.apache.maven.surefire</groupId>
202+
<artifactId>surefire-junit47</artifactId>
203+
<version>${surefire.version}</version>
204+
</dependency>
205+
<dependency>
206+
<groupId>org.apache.maven.surefire</groupId>
207+
<artifactId>surefire-testng</artifactId>
208+
<version>${surefire.version}</version>
209+
</dependency>
210+
</dependencies>
211+
<configuration>
212+
<threadCount>1</threadCount>
213+
<suiteXmlFiles>
214+
<suiteXmlFile>tck-suite.xml</suiteXmlFile>
215+
</suiteXmlFiles>
216+
<!-- <argLine>-verbose:class</argLine>-->
217+
</configuration>
218+
</plugin>
219+
<plugin>
220+
<groupId>uk.co.deliverymind</groupId>
221+
<artifactId>wiremock-maven-plugin</artifactId>
222+
<version>2.7.0</version>
223+
<executions>
224+
<execution>
225+
<phase>test-compile</phase>
226+
<goals>
227+
<goal>run</goal>
228+
</goals>
229+
<configuration>
230+
<dir>target/classes</dir>
231+
<params>--port=8765</params>
232+
<!-- Enable verbose for more detailed output-->
233+
<!-- <params>&#45;&#45;verbose</params>-->
234+
</configuration>
235+
</execution>
236+
</executions>
237+
</plugin>
238+
</plugins>
239+
</build>
240+
</profile>
241+
</profiles>
242+
243+
<properties>
244+
<surefire.security.argline>-Djava.security.manager -Djava.security.policy=${project.build.directory}/test-classes/server.policy</surefire.security.argline>
245+
<jetty.version>9.4.27.v20200227</jetty.version>
246+
</properties>
247+
248+
249+
</project>

tests/integration/microprofile/rest-client/src/test/resources/arquillian.xml renamed to tests/integration/microprofile/rest-client-tck/src/test/resources/arquillian.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
4+
Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
55
66
This program and the accompanying materials are made available under the
77
terms of the Eclipse Public License v. 2.0, which is available at
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v. 2.0, which is available at
6+
* http://www.eclipse.org/legal/epl-2.0.
7+
*
8+
* This Source Code may also be made available under the following Secondary
9+
* Licenses when the conditions for such availability set forth in the
10+
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
11+
* version 2 with the GNU Classpath Exception, which is available at
12+
* https://www.gnu.org/software/classpath/license.html.
13+
*
14+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15+
*/
16+
17+
grant {
18+
permission java.security.AllPermission;
19+
};

tests/integration/microprofile/rest-client/tck-suite.xml renamed to tests/integration/microprofile/rest-client-tck/tck-suite.xml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,24 @@
2020
<suite name="microprofile-rest-client-TCK" verbose="2" configfailurepolicy="continue">
2121

2222
<test name="microprofile-rest-client TCK">
23-
<!-- Exclude the TCK tests till the TCK bundle contains references to javax.servlet -->
24-
25-
<!-- <packages>-->
26-
<!-- <package name="org.eclipse.microprofile.rest.client.tck.*">-->
27-
<!-- </package>-->
28-
<!-- </packages>-->
29-
<!-- <classes>-->
30-
<!-- <class name="org.eclipse.microprofile.rest.client.tck.ProxyServerTest">-->
31-
<!-- <methods>-->
32-
<!-- &lt;!&ndash;https://github.com/eclipse/microprofile-rest-client/pull/298&ndash;&gt;-->
33-
<!-- <exclude name="testProxy"></exclude>-->
34-
<!-- </methods>-->
35-
<!-- </class>-->
36-
<!-- </classes>-->
23+
<packages>
24+
<package name="org.eclipse.microprofile.rest.client.tck.*">
25+
</package>
26+
</packages>
27+
<classes>
28+
<class name="org.eclipse.microprofile.rest.client.tck.ProxyServerTest">
29+
<methods>
30+
<!--https://github.com/eclipse/microprofile-rest-client/pull/298-->
31+
<exclude name="testProxy"></exclude>
32+
</methods>
33+
</class>
34+
<class name="org.eclipse.microprofile.rest.client.tck.cditests.CDIInterceptorTest">
35+
<methods>
36+
<!--https://github.com/eclipse/microprofile-rest-client/pull/336-->
37+
<exclude name="testInterceptorNotInvokedWhenNoAnnotationApplied"></exclude>
38+
</methods>
39+
</class>
40+
</classes>
3741
</test>
3842

3943
</suite>

0 commit comments

Comments
 (0)