Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-2089

Fail message with one non-ASCII characters and a lot of characters lead to corruption

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-M6
    • 3.0.0-M7
    • None
    • None
    • Java openjdk 15.0.5
      MacOS Monterey 12.4

    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.

      Attachments

        1. ErrorInvestigation.zip
          22 kB
          Clement Gaboriau Couanau

        Activity

          People

            sjaranowski Slawomir Jaranowski
            ClementGC Clement Gaboriau Couanau
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: