org.junit.ComparisonFailure: Multi-line string inserted incorrectly expected:<...-line comment line 1[
-- line 2'
]
/* line 3 */> but was:<...-line comment line 1[
-- line 2']
/* line 3 */>" type="org.junit.ComparisonFailure">org.junit.ComparisonFailure: Multi-line string inserted incorrectly expected:<...-line comment line 1[ -- line 2' ] /* line 3 */> but was:<...-line comment line 1[ -- line 2'] /* line 3 */>

Hibernate JIRA | Carsten Hammer | 5 months ago
  1. 0

    org.hibernate.test.fileimport.CommandExtractorServiceTest > testImportFile FAILED org.junit.ComparisonFailure org.hibernate.test.fileimport.MultiLineImportFileTest > testImportFile FAILED org.junit.ComparisonFailure at MultiLineImportFileTest.java:66 <?xml version="1.0" encoding="UTF-8"?> <testsuite name="org.hibernate.test.fileimport.MultiLineImportFileTest" tests="1" skipped="0" failures="1" errors="0" timestamp="2016-07-06T09:42:26" hostname="chammer-PC" time="0.137"> <properties/> <testcase name="testImportFile" classname="org.hibernate.test.fileimport.MultiLineImportFileTest" time="0.137"> <failure message="org.junit.ComparisonFailure: Multi-line string inserted incorrectly expected:&lt;...-line comment line 1[&#13;&#10;-- line 2'&#13;]&#10;/* line 3 */&gt; but was:&lt;...-line comment line 1[&#10;-- line 2']&#10;/* line 3 */&gt;" type="org.junit.ComparisonFailure">org.junit.ComparisonFailure: Multi-line string inserted incorrectly expected:&lt;...-line comment line 1[ -- line 2' ] /* line 3 */&gt; but was:&lt;...-line comment line 1[ -- line 2'] /* line 3 */&gt; at org.junit.Assert.assertEquals(Assert.java:115) at org.hibernate.test.fileimport.MultiLineImportFileTest.testImportFile(MultiLineImportFileTest.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74) </failure> ...

    Hibernate JIRA | 5 months ago | Carsten Hammer
    org.junit.ComparisonFailure: Multi-line string inserted incorrectly expected:&lt;...-line comment line 1[&#13;&#10;-- line 2'&#13;]&#10;/* line 3 */&gt; but was:&lt;...-line comment line 1[&#10;-- line 2']&#10;/* line 3 */&gt;" type="org.junit.ComparisonFailure">org.junit.ComparisonFailure: Multi-line string inserted incorrectly expected:&lt;...-line comment line 1[ -- line 2' ] /* line 3 */&gt; but was:&lt;...-line comment line 1[ -- line 2'] /* line 3 */&gt;
  2. 0

    A clean checkout on Windows results in two test failures. They're actually both the same test; it just runs twice (in a base class and a derived class): CommandExtractorServiceTest. testImportFile MultiLineImportFileTest. testImportFile The full test output is: {code} org.junit.ComparisonFailure: Multi-line string inserted incorrectly expected:<...-line comment line 1[ -- line 2' ] /* line 3 */> but was:<...-line comment line 1[ -- line 2'] /* line 3 */> at org.junit.Assert.assertEquals(Assert.java:125) at org.hibernate.test.fileimport.MultiLineImportFileTest.testImportFile(MultiLineImportFileTest.java:83) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:63) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:62) {code} This isn't a problem on the CI server, but I'm not the only person to encounter it. See, for example, [this comment|https://hibernate.atlassian.net/browse/HHH-7714?focusedCommentId=50612&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-50612] I've fixed this locally myself. Pull request coming shortly...

    Hibernate JIRA | 3 years ago | Harry Cummings
    org.junit.ComparisonFailure: Multi-line string inserted incorrectly expected:<...-line comment line 1[ -- line 2' ] /* line 3 */> but was:<...-line comment line 1[ -- line 2'] /* line 3 */>
  3. 0

    A clean checkout on Windows results in two test failures. They're actually both the same test; it just runs twice (in a base class and a derived class): CommandExtractorServiceTest. testImportFile MultiLineImportFileTest. testImportFile The full test output is: {code} org.junit.ComparisonFailure: Multi-line string inserted incorrectly expected:<...-line comment line 1[ -- line 2' ] /* line 3 */> but was:<...-line comment line 1[ -- line 2'] /* line 3 */> at org.junit.Assert.assertEquals(Assert.java:125) at org.hibernate.test.fileimport.MultiLineImportFileTest.testImportFile(MultiLineImportFileTest.java:83) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:63) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:62) {code} This isn't a problem on the CI server, but I'm not the only person to encounter it. See, for example, [this comment|https://hibernate.atlassian.net/browse/HHH-7714?focusedCommentId=50612&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-50612] I've fixed this locally myself. Pull request coming shortly...

    Hibernate JIRA | 3 years ago | Harry Cummings
    org.junit.ComparisonFailure: Multi-line string inserted incorrectly expected:<...-line comment line 1[ -- line 2' ] /* line 3 */> but was:<...-line comment line 1[ -- line 2'] /* line 3 */>
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    HandleAccessorTest failing in maven

    GitHub | 2 years ago | sammefford
    org.junit.ComparisonFailure: byte[] content mismatch expected:<[ยก]Hola!> but was:<[?]Hola!>
  6. 0

    gateway.transport.wsn: IdleTimeoutExtensionPongsIT.shouldGetPongsFromidleTimeoutExtensionWhenWriterIdle spurious failures

    GitHub | 2 years ago | dpwspoon
    org.junit.ComparisonFailure: Robotic behavior did not match expected expected:<... (frequent enough) [write await SLEEP_ONE write [0x81 0x83 0x01 0x01 0x01 0x01 0x30 0x33 0x32] write await SLEEP_TWO write [0x81 0x83 0x01 0x01 0x01 0x01 0x30 0x33 0x32] write await SLEEP_THREE write [0x81 0x83 0x01 0x01 0x01 0x01 0x30 0x33 0x32] write await SLEEP_FOUR write [0x81 0x83 0x01 0x01 0x01 0x01 0x30 0x33 0x32] write await SLEEP_FIVE write [0x81 0x83 0x01 0x01 0x01 0x01 0x30 0x33 0x32] write await SLEEP_SIX write [0x81 0x83 0x01 0x01 0x01 0x01 0x30 0x33 0x32] write await SLEEP_SEVEN write [0x81 0x83 0x01 0x01 0x01 0x01 0x30 0x33 0x32] write await SLEEP_EIGHT write [0x81 0x83 0x01 0x01 0x01 0x01 0x30 0x33 0x32] # Expect (extension) PONG read [0x81 0x06 0x01 0x01 0x01 0x02 0x0a 0x00] # Do clean close write [0x88 0x00] read [0x88 0x00] close closed # Connection from back end of proxy service # ========================================= accept tcp://127.0.0.1:8002 accepted connected # read 8 "abc" frames read [0x31 0x32 0x33] read [0x31 0x32 0x33] read [0x31 0x32 0x33] read [0x31 0x32 0x33] read [0x31 0x32 0x33] read [0x31 0x32 0x33] read [0x31 0x32 0x33] read [0x31 0x32 0x33] closed # Connect to ServerSocket in test method to read period data to simulate SLEEP # ============================================================================ connect tcp://localhost:61234 connected read "WakeUp1" read notify SLEEP_ONE read "WakeUp2" read notify SLEEP_TWO read "WakeUp3" read notify SLEEP_THREE read "WakeUp4" read notify SLEEP_FOUR read "WakeUp5" read notify SLEEP_FIVE read "WakeUp6" read notify SLEEP_SIX read "WakeUp7" read notify SLEEP_SEVEN read "WakeUp8" read notify SLEEP_EIGHT close closed] > but was:<... (frequent enough) [[id: 0xff0937ae, /127.0.0.1:60170 => /127.0.0.1:8001] RECEIVED: BigEndianHeapChannelBuffer(ridx=0, widx=8, cap=8) +-------------------------------------------------+ | 0 1 2 3 4 5 6 7 8 9 a b c d e f | +--------+-------------------------------------------------+----------------+ |00000000| 81 06 01 01 01 02 09 00 |........ | +--------+-------------------------------------------------+----------------+ # Connection from back end of proxy service # ========================================= accept tcp://127.0.0.1:8002 accepted connected # read 8 "abc" frames [id: 0x7a23f384, /127.0.0.1:37075 :> /127.0.0.1:8002] DISCONNECTED # Connect to ServerSocket in test method to read period data to simulate SLEEP # ============================================================================ connect tcp://localhost:61234 [id: 0xb2327577] CLOSED] >

    7 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.junit.ComparisonFailure

      Multi-line string inserted incorrectly expected:&lt;...-line comment line 1[&#13;&#10;-- line 2'&#13;]&#10;/* line 3 */&gt; but was:&lt;...-line comment line 1[&#10;-- line 2']&#10;/* line 3 */&gt;" type="org.junit.ComparisonFailure">org.junit.ComparisonFailure: Multi-line string inserted incorrectly expected:&lt;...-line comment line 1[ -- line 2' ] /* line 3 */&gt; but was:&lt;...-line comment line 1[ -- line 2'] /* line 3 */&gt;

      at org.junit.Assert.assertEquals()
    2. JUnit
      Assert.assertEquals
      1. org.junit.Assert.assertEquals(Assert.java:115)
      1 frame
    3. org.hibernate.test
      MultiLineImportFileTest.testImportFile
      1. org.hibernate.test.fileimport.MultiLineImportFileTest.testImportFile(MultiLineImportFileTest.java:66)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:497)
      4 frames
    5. JUnit
      FrameworkMethod.invokeExplosively
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      3 frames
    6. A Hibernate O/RM Module
      ExtendedFrameworkMethod.invokeExplosively
      1. org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45)
      1 frame
    7. JUnit
      FailOnTimeout$StatementThread.run
      1. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      2. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      3. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      4. org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
      4 frames