Skip to content

Commit

Permalink
Add new category for testing with WildFly and not overriding the REST…
Browse files Browse the repository at this point in the history
…Easy modules for tests that would require an upgrade of the modules.

Signed-off-by: James R. Perkins <jperkins@redhat.com>
  • Loading branch information
jamezp committed Sep 12, 2023
1 parent 5534519 commit f2db2ea
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/wildfly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
profile:
- '-Dsecurity.manager'
- '-Dprovision.preview'
- '-am -Pprovision-without-resteasy,without-jackson -pl testsuite/integration-tests'
- '-am -Pprovision-without-resteasy,without-jackson,skip.awaiting.upgrade.tests -pl testsuite/integration-tests'

steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* JBoss, Home of Professional Open Source.
*
* Copyright 2023 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.jboss.resteasy.category;

/**
* Used as a JUnit category indicating the test will fail when running on WildFly until an upgrade is merged.
*
* @author <a href="mailto:jperkins@redhat.com">James R. Perkins</a>
*/
public interface AwaitingUpgradeInWildFly {
}
6 changes: 6 additions & 0 deletions testsuite/integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@
<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>
</properties>
</profile>
</profiles>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.test.api.RunAsClient;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.resteasy.category.AwaitingUpgradeInWildFly;
import org.jboss.resteasy.client.jaxrs.ResteasyClient;
import org.jboss.resteasy.test.annotations.FollowUpRequired;
import org.jboss.resteasy.test.response.resource.AsyncResponseCallback;
import org.jboss.resteasy.test.response.resource.CompletionStageProxy;
import org.jboss.resteasy.test.response.resource.CompletionStageResponseMessageBodyWriter;
Expand All @@ -25,6 +27,7 @@
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;

/**
Expand Down Expand Up @@ -95,8 +98,10 @@ public void testText() throws Exception {

/**
* @tpTestDetails Resource method returns CompletableFuture<String>.
* @tpSince RESTEasy 4.7
* @tpSince RESTEasy 6.2
*/
@FollowUpRequired("Remove the category when 6.2.6.Final is merged into WildFly")
@Category(AwaitingUpgradeInWildFly.class)
@Test
public void testCompletableFutureText() throws Exception {
Invocation.Builder request = client.target(generateURL("/cftext")).request();
Expand Down

0 comments on commit f2db2ea

Please sign in to comment.