Force UTF-8 encoding in all tests. This fixes several test failures when running tests from Windows commandline because Windows doesn't default to using UTF-8.

This commit is contained in:
Tim Donohue
2025-07-21 15:58:37 -05:00
parent e9f32b9a1b
commit d5457029ad

10
pom.xml
View File

@@ -531,10 +531,10 @@
</build> </build>
<profiles> <profiles>
<!-- Allow for passing extra memory to Unit/Integration tests. <!-- Profile which sets our default system properties for all Unit/Integration tests.
By default this gives unit tests 1GB of memory max (when tests are enabled), By default, this sets UTF-8 encoding for all tests and gives tests 1GB of memory max.
unless tweaked on commandline (e.g. "-Dtest.argLine=-Xmx512m"). Since Both m-surefire-p and m-failsafe-p are unable to use MAVEN_OPTS because they fork a new JVM for testing.
m-surefire-p and m-failsafe-p both fork a new JVM for testing, they ignores MAVEN_OPTS. --> These default settings may be overridden via the commandline (e.g. "-Dtest.argLine=-Xmx512m"). -->
<profile> <profile>
<id>test-argLine</id> <id>test-argLine</id>
<activation> <activation>
@@ -543,7 +543,7 @@
</property> </property>
</activation> </activation>
<properties> <properties>
<test.argLine>-Xmx1024m</test.argLine> <test.argLine>-Xmx1024m -Dfile.encoding=UTF-8</test.argLine>
</properties> </properties>
</profile> </profile>