-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
Problem
When you run mvn test
on a non-English environment, the test JavaSyntax17CompilationTest.testInstrumentationAndCompilation_17_NonReifiableTypes
will fail with the following error:
-------------------------------------------------------------------------------
Test set: com.atlassian.clover.JavaSyntax17CompilationTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.495 sec <<< FAILURE! - in com.atlassian.clover.JavaSyntax17CompilationTest
testInstrumentationAndCompilation_17_NonReifiableTypes(com.atlassian.clover.JavaSyntax17CompilationTest) Time elapsed: 1.622 sec <<< FAILURE!
junit.framework.AssertionFailedError: A pattern '.*\[unchecked\] Possible heap pollution from parameterized vararg type T.*' was not found in ant output
at junit.framework.Assert.fail(Assert.java:57)
at junit.framework.Assert.assertTrue(Assert.java:22)
at junit.framework.TestCase.assertTrue(TestCase.java:192)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1484)
at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.callStatic(StaticMetaClassSite.java:64)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:55)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:197)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:217)
at com.atlassian.clover.JavaSyntaxCompilationTestBase.assertAntOutputContains(JavaSyntaxCompilationTestBase.groovy:311)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:177)
at com.atlassian.clover.JavaSyntax17CompilationTest.testInstrumentationAndCompilation_17_NonReifiableTypes(JavaSyntax17CompilationTest.groovy:49)
Solution
Setting -Duser.language=en
to JAVA_TOOL_OPTIONS
fixes this problem.
Note
The following workarounds didn't work for me:
- Add
-DargLine
option likemvn -DargLine="-Duser.language=en" test
- Add
<user.language>en</user.language>
to<configuration>
ofmaven-compiler-plugin