Skip to content

Commit

Permalink
[RESTEASY-3388] Remove the old tags/categories and add a new @Tracing…
Browse files Browse the repository at this point in the history
…Required annotation with a new tag.

https://issues.redhat.com/browse/RESTEASY-3388
Signed-off-by: James R. Perkins <jperkins@redhat.com>
  • Loading branch information
jamezp committed Feb 16, 2024
1 parent 0beb753 commit 796b5fc
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 130 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/wildfly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
profile:
- '-Dsecurity.manager'
- '-Dprovision.preview'
- '-am -Pprovision-without-resteasy,without-jackson,skip-awaiting-upgrade-tests -pl testsuite/integration-tests'
- '-am -Pprovision-without-resteasy,without-jackson-tests -pl testsuite/integration-tests'

steps:
- uses: actions/checkout@v4
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* JBoss, Home of Professional Open Source.
*
* Copyright 2021 Red Hat, Inc., and individual contributors
* Copyright 2024 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -17,12 +17,22 @@
* limitations under the License.
*/

package org.jboss.resteasy.category;
package org.jboss.resteasy.test.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.junit.jupiter.api.Tag;

/**
* A marker for a test category that indicates the tracing API is required.
* Indicates that a tracing implementation is required
*
* @author <a href="mailto:jperkins@redhat.com">James R. Perkins</a>
*/
public interface TracingRequired {
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Tag("tracing.required")
public @interface TracingRequired {
}
8 changes: 1 addition & 7 deletions testsuite/integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,7 @@
</property>
</activation>
<properties>
<additional.surefire.exclude.tracing.tests>,org.jboss.resteasy.category.TracingRequired</additional.surefire.exclude.tracing.tests>
</properties>
</profile>
<profile>
<id>skip-awaiting-upgrade-tests</id>
<properties>
<additional.surefire.excluded.groups>,org.jboss.resteasy.category.AwaitingUpgradeInWildFly</additional.surefire.excluded.groups>
<additional.surefire.exclude.tracing.tests>,tracing.required</additional.surefire.exclude.tracing.tests>
</properties>
</profile>
</profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ public void testResourceCompositeNoCache() {
* @tpSince RESTEasy 7.0.0
*/
@Test
@Tag("AwaitingUpgradeInWildFly.class")
@FollowUpRequired("Caused by RESTEASY-3111. Once upgraded in WildFly, we can re-enable this test")
public void testInheritedResourceValid() {
WebTarget base = client.target(generateURL("/inheritance"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.jboss.arquillian.junit5.ArquillianExtension;
import org.jboss.resteasy.client.jaxrs.internal.ResteasyClientBuilderImpl;
import org.jboss.resteasy.plugins.server.servlet.ResteasyContextParameters;
import org.jboss.resteasy.test.annotations.TracingRequired;
import org.jboss.resteasy.test.client.exception.ClientWebApplicationExceptionResteasyProxyTest;
import org.jboss.resteasy.test.exception.resource.ClosedResponseHandlingEnableTracingRequestFilter;
import org.jboss.resteasy.test.exception.resource.ClosedResponseHandlingPleaseMapExceptionMapper;
Expand All @@ -38,7 +39,7 @@
*/
@ExtendWith(ArquillianExtension.class)
@RunAsClient
@Tag("TracingRequired.class")
@TracingRequired
public class ClosedResponseHandlingTest {

public static final String oldBehaviorDeploymentName = "OldBehaviorClosedResponseHandlingTest";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
*/
@ExtendWith(ArquillianExtension.class)
@RunAsClient
@Tag("AwaitingUpgradeInWildFly.class")
@FollowUpRequired("Caused by RESTEASY-3380. Once upgraded in WildFly, we can re-enable this test")
public class WhiteListPolymorphicTypeValidatorManualOverrideTest {

protected static final Logger logger = Logger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
*/
@ExtendWith(ArquillianExtension.class)
@RunAsClient
@Tag("AwaitingUpgradeInWildFly.class")
@FollowUpRequired("Caused by RESTEASY-3380. Once upgraded in WildFly, we can re-enable this test")
public class WhiteListPolymorphicTypeValidatorTest {

protected static final Logger logger = Logger.getLogger(WhiteListPolymorphicTypeValidatorTest.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public void postDateProduce() throws Exception {
* @tpSince RESTEasy 3.0.16
*/
@Test
@Tag("ExpectedFailing.class")
public void postDate() throws Exception {
WebTarget target = client.target(generateURL("/postDate"));
ByteArrayOutputStream baos = new ByteArrayOutputStream(5000);
Expand Down Expand Up @@ -127,7 +126,6 @@ public void postFooProduce() throws Exception {
* @tpSince RESTEasy 3.0.16
*/
@Test
@Tag("ExpectedFailing.class")
public void postFoo() throws Exception {
WebTarget target = client.target(generateURL("/postFoo"));
ByteArrayOutputStream baos = new ByteArrayOutputStream(5000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ public void testText() throws Exception {
* @tpTestDetails Resource method returns CompletableFuture<String>.
* @tpSince RESTEasy 6.2
*/
@FollowUpRequired("Remove the category when 6.2.6.Final is merged into WildFly")
@Tag("AwaitingUpgradeInWildFly.class")
@Test
public void testCompletableFutureText() throws Exception {
Invocation.Builder request = client.target(generateURL("/cftext")).request();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
*/
@ExtendWith(ArquillianExtension.class)
@RunAsClient
@Tag("AwaitingUpgradeInWildFly.class")
@FollowUpRequired("Caused by RESTEASY-3380. Once upgraded in WildFly, we can re-enable this test")
public class ResponseTrimmingTest {

static Client client;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
@ServerSetup({ BasicAuthTest.SecurityDomainSetup.class })
@ExtendWith(ArquillianExtension.class)
@RunAsClient
@Tag("ExpectedFailingOnWildFly18.class") //WFLY-12655
public class BasicAuthTest {

private static final String WRONG_RESPONSE = "Wrong response content.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
@ServerSetup({ CustomForbiddenMessageTest.SecurityDomainSetup.class })
@ExtendWith(ArquillianExtension.class)
@RunAsClient
@Tag("ExpectedFailingOnWildFly18.class") //WFLY-12655
public class CustomForbiddenMessageTest {

private static ResteasyClient authorizedClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
@ServerSetup(TwoSecurityDomainsTest.SecurityDomainSetup.class)
@ExtendWith(ArquillianExtension.class)
@RunAsClient
@Tag("ExpectedFailingOnWildFly18.class") //WFLY-12655
public class TwoSecurityDomainsTest {

private static ResteasyClient authorizedClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.logging.Logger;
import org.jboss.resteasy.plugins.server.servlet.ResteasyContextParameters;
import org.jboss.resteasy.test.annotations.TracingRequired;
import org.jboss.resteasy.utils.PortProviderUtil;
import org.jboss.resteasy.utils.TestUtil;
import org.jboss.shrinkwrap.api.Archive;
Expand All @@ -32,7 +33,7 @@

@ExtendWith(ArquillianExtension.class)
@RunAsClient
@Tag("TracingRequired.class")
@TracingRequired
public abstract class TracingTestBase {
protected static final String WAR_BASIC_TRACING_FILE = "war_basic_tracing";
protected static final String WAR_ON_DEMAND_TRACING_FILE = "war_on_demand_tracing";
Expand Down
70 changes: 1 addition & 69 deletions testsuite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
<version.resteasy.testsuite>${version.resteasy.testsuite}</version.resteasy.testsuite>
<jboss.server.config.file.name>${jboss.server.config.file.name}</jboss.server.config.file.name>
</systemPropertyVariables>
<excludedGroups>org.jboss.resteasy.category.ExpectedFailing${additional.surefire.excluded.groups}${additional.surefire.exclude.tracing.tests}</excludedGroups>
<excludedGroups>${additional.surefire.excluded.groups}${additional.surefire.exclude.tracing.tests}</excludedGroups>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -179,54 +179,6 @@
<jboss.home>${server.home}</jboss.home>
</properties>
</profile>
<profile>
<id>server-version-21x-exclusions</id>
<activation>
<property>
<name>server.version</name>
<value>21.0.1.Final</value>
</property>
</activation>
<properties>
<additional.surefire.excluded.groups>,org.jboss.resteasy.category.ExpectedFailingOnWildFly21</additional.surefire.excluded.groups>
</properties>
</profile>
<profile>
<id>server-version-20x-exclusions</id>
<activation>
<property>
<name>server.version</name>
<value>20.0.1.Final</value>
</property>
</activation>
<properties>
<additional.surefire.excluded.groups>,org.jboss.resteasy.category.ExpectedFailingOnWildFly20</additional.surefire.excluded.groups>
</properties>
</profile>
<profile>
<id>server-version-19x-exclusions</id>
<activation>
<property>
<name>server.version</name>
<value>19.1.0.Final</value>
</property>
</activation>
<properties>
<additional.surefire.excluded.groups>,org.jboss.resteasy.category.ExpectedFailingOnWildFly19</additional.surefire.excluded.groups>
</properties>
</profile>
<profile>
<id>server-version-18x-exclusions</id>
<activation>
<property>
<name>server.version</name>
<value>18.0.1.Final</value>
</property>
</activation>
<properties>
<additional.surefire.excluded.groups>,org.jboss.resteasy.category.ExpectedFailingOnWildFly18</additional.surefire.excluded.groups>
</properties>
</profile>
<!-- If resteasy.version is specified, it will be used for tests instead of the project.version -->
<profile>
<id>custom-resteasy-version</id>
Expand Down Expand Up @@ -262,32 +214,12 @@
<project.version>${project.version}</project.version>
<version.resteasy.testsuite>${version.resteasy.testsuite}</version.resteasy.testsuite>
</systemPropertyVariables>
<excludedGroups>org.jboss.resteasy.category.ExpectedFailing</excludedGroups>
</configuration>
</plugin>

</plugins>
</build>
</profile>
<!-- For testing purposes enable to run all tests including the failing ones -->
<profile>
<id>enable.expected.failing</id>
<activation>
<property>
<name>enable.expected.failing</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration combine.children="append">
<excludedGroups></excludedGroups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- This profile starts server with security manager -->
<profile>
<id>security.manager</id>
Expand Down

0 comments on commit 796b5fc

Please sign in to comment.