Skip to content

Commit

Permalink
Merge pull request #18790 from famod/ea-jdk-jwt
Browse files Browse the repository at this point in the history
Disable TokenUtilsEncryptTest#testFailAlgorithm on Java 17+
  • Loading branch information
famod authored Jul 19, 2021
2 parents df12275 + a5b9a3c commit d64efc0
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 1 deletion.
42 changes: 41 additions & 1 deletion tcks/microprofile-jwt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<executions>
<execution>
<id>unpack-suite-files</id>
<phase>process-test-classes</phase>
<phase>generate-test-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
Expand Down Expand Up @@ -164,4 +164,44 @@
</dependency>
</dependencies>

<profiles>
<profile>
<id>jdk17-workarounds</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<build>
<plugins>
<!-- Adds exclusions to tck-base-suite.xml (note: exclusions in surefire don't work if using a suiteXmlFile)-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.0.2</version>
<executions>
<execution>
<id>jdk17-add-exclusions</id>
<phase>process-test-resources</phase>
<goals>
<goal>transform</goal>
</goals>
</execution>
</executions>
<configuration>
<transformationSets>
<transformationSet>
<dir>${project.build.directory}/tck-suite/suites</dir>
<outputDir>${project.build.directory}/tck-suite/suites</outputDir>
<stylesheet>src/test/xml/exclusions-jdk17.xsl</stylesheet>
</transformationSet>
</transformationSets>
<catalogs>
<catalog>src/test/xml/catalog.xml</catalog>
</catalogs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
4 changes: 4 additions & 0 deletions tcks/microprofile-jwt/src/test/xml/catalog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<!-- The xml plugin chokes on the redirect, so re-map it to directly https -->
<system systemId="http://testng.org/testng-1.0.dtd" uri="https://testng.org/testng-1.0.dtd"/>
</catalog>
22 changes: 22 additions & 0 deletions tcks/microprofile-jwt/src/test/xml/exclusions-jdk17.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Retain DTD (yes, with http instead of https, otherwise testng will issue a warning) -->
<xsl:output method="xml" doctype-system="http://testng.org/testng-1.0.dtd"/>

<!-- Identity transform -->
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>

<!-- Exclude TokenUtilsEncryptTest#testFailAlgorithm due to https://github.com/quarkusio/quarkus/issues/18372#issuecomment-877864662 -->
<xsl:template match="class[@name = 'org.eclipse.microprofile.jwt.tck.util.TokenUtilsEncryptTest']">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:copy-of select="node()"/>
<methods><exclude name="testFailAlgorithm" /></methods>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

0 comments on commit d64efc0

Please sign in to comment.