Skip to content

Commit

Permalink
Fix tests for running on Java 11. This requires setting a version of …
Browse files Browse the repository at this point in the history
…WildFly which is compiled to Java 11.

Signed-off-by: James R. Perkins <jperkins@redhat.com>
  • Loading branch information
jamezp committed Dec 12, 2024
1 parent 92be090 commit 90a76ae
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/legacy-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
cache: 'maven'
distribution: 'temurin'
- name: Build and Test on ${{ matrix.java }} - ${{ matrix.wildfly-version }}
run: mvn clean install '-Dorg.jboss.logmanager.nocolor=true' '-Dversion.org.wildfly=${{ matrix.wildfly-version }}'
run: mvn clean install '-Dorg.jboss.logmanager.nocolor=true' '-Dversion.org.wildfly=${{ matrix.wildfly-version }}' '-Dskip.channel.tests'
- name: Upload surefire logs for failed run
uses: actions/upload-artifact@v4
if: failure()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright The WildFly Authors
* SPDX-License-Identifier: Apache-2.0
*/

package org.wildfly.plugin.categories;

/**
* @author <a href="mailto:jperkins@redhat.com">James R. Perkins</a>
*/
public interface ChannelsRequired {
}
21 changes: 21 additions & 0 deletions tests/standalone-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,25 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>skip-channel-tests</id>
<activation>
<property>
<name>skip.channel.tests</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>org.wildfly.plugin.categories.ChannelsRequired</excludedGroups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.junit.Assert;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.wildfly.plugin.categories.ChannelsRequired;
import org.wildfly.plugin.tests.AbstractProvisionConfiguredMojoTestCase;
import org.wildfly.plugin.tests.AbstractWildFlyMojoTest;

Expand All @@ -36,6 +38,7 @@ public void testPackage() throws Exception {
}

@Test
@Category(ChannelsRequired.class)
public void testPackageWithChannel() throws Exception {

final Mojo packageMojo = lookupConfiguredMojo(AbstractWildFlyMojoTest.getPomFile("package-channel-pom.xml").toFile(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
<manifest>
<groupId>org.wildfly.channels</groupId>
<artifactId>wildfly</artifactId>
<version>WF_VERSION</version>
</manifest>
</channel>
</channels>
<feature-packs>
<feature-pack>
<location>org.wildfly:wildfly-galleon-pack</location>
<location>org.wildfly:wildfly-galleon-pack:WF_VERSION</location>
</feature-pack>
</feature-packs>
<layers>
Expand Down

0 comments on commit 90a76ae

Please sign in to comment.