Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable TokenUtilsEncryptTest#testFailAlgorithm on Java 17+ #18790

Merged
merged 1 commit into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>