This is an automated email from the ASF dual-hosted git repository.

chrisdutz pushed a commit to branch fix/it-force-english-locale
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 69e2003093c13c7f6bf833562afcd30e8a4dbc95
Author: Christofer Dutz <[email protected]>
AuthorDate: Sat Oct 31 00:20:41 2026 +0100

    [IT] Force English locale for integration test JVMs
    
    Integration tests fail on hosts with a non-English default locale (e.g.
    de_DE): String.format("%f") in tests renders decimal commas into SQL, and
    server-side number formatting (format(), UDF output) differs from the
    expected English output.
    
    Export -Duser.language=en -Duser.country=US as JAVA_TOOL_OPTIONS via
    failsafe's environmentVariables. The forked test JVM picks it up directly
    and the DataNode/ConfigNode processes spawned by AbstractNodeWrapper
    inherit it through ProcessBuilder. The value is configurable via the
    integrationTest.localeOpts property.
---
 integration-test/pom.xml | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/integration-test/pom.xml b/integration-test/pom.xml
index f6624fbd65d..05b8ce8b1d1 100644
--- a/integration-test/pom.xml
+++ b/integration-test/pom.xml
@@ -34,6 +34,13 @@
         <integrationTest.forkCount>1</integrationTest.forkCount>
         <integrationTest.includedGroups/>
         
<integrationTest.launchNodeInSameJVM>true</integrationTest.launchNodeInSameJVM>
+        <!--
+          Force an English locale for the test JVM and for the 
DataNode/ConfigNode processes it spawns
+          (they inherit the environment). Many ITs format numbers with 
String.format("%f") or compare
+          formatted output (e.g. "1,000,000" / "1.1"), which breaks on hosts 
with a non-English default
+          locale such as de_DE.
+        -->
+        <integrationTest.localeOpts>-Duser.language=en 
-Duser.country=US</integrationTest.localeOpts>
         <integrationTest.nodeMaxHeapSize>200m</integrationTest.nodeMaxHeapSize>
         <integrationTest.nodeNewHeapSize>200m</integrationTest.nodeNewHeapSize>
         
<integrationTest.randomSelectWriteNode>true</integrationTest.randomSelectWriteNode>
@@ -330,6 +337,9 @@
                                 <exclude>**/subscription/it/**</exclude>
                             </excludes>
                             <useSystemClassLoader>false</useSystemClassLoader>
+                            <environmentVariables>
+                                
<JAVA_TOOL_OPTIONS>${integrationTest.localeOpts}</JAVA_TOOL_OPTIONS>
+                            </environmentVariables>
                             <parallel>none</parallel>
                             <forkCount>${integrationTest.forkCount}</forkCount>
                             <reuseForks>false</reuseForks>

Reply via email to