Skip to content

Commit

Permalink
pom: Fix unit test failure on GitHub actions (TEDEFO-2937)
Browse files Browse the repository at this point in the history
The unit tests were failing when run via GitHub Actions because there
was no default country found by Saxon when executing the XSL files.
This caused a DateTimeException when executing the "format-date"
XPath function.

This is probably because the GitHub runners have no locale defined.

Explicitly set the country to BE when running the unit test, via the
Surefire plugin configuration. It has to be done this way because
Surefire forks a new JVM and this needs to be set at the startup of the
JVM. The command line arguments used when running Maven are not passed
along.
  • Loading branch information
bertrand-lorentz committed Dec 13, 2023
1 parent 22b5e9d commit 62d3175
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${version.surefire.plugin}</version>
<configuration>
<argLine>-Duser.country=BE</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
Expand Down

0 comments on commit 62d3175

Please sign in to comment.