Details
Description
I have a problem when running my tests with Maven.
When running this test:
@Test public void testFail() { fail( "aaaa¸aaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenv"); }
From IntelliJ, it fails as expected.
From the command line, it does not fail, I obtain the following result
> mvn test -pl com/xx -Dtest=MyClass [INFO] Running com.xx.MyClass [ERROR] aaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenv::j:aaaa¸aaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenv:�:MyClass.testFail:666 aaaa¸aaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenv: �:org.opentest4j.AssertionFailedError: aaaa¸aaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaaaaaffffffffffffffffffavaaaaaaaaaaenvaaaaenvaaaaaaaenvaaaaaaaenvaaaaaaaenv [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 s - in com.xx.MyClass
Then, it returns no error (return value of the command line is 0).
When reducing the number of characters, or (exclusive OR) by simply removing the fifth character (non-ASCII), it fails as expected. I replaced this non-ASCII character with the middle-dot character and I obtained the same result.