org.junit.ComparisonFailure

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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...
    via by Harry Cummings,
  • 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...
    via by Harry Cummings,
  • 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> ...
    via by Carsten Hammer,
  • Failed test
    via GitHub by tram
    ,
  • GitHub comment 81#32185642
    via GitHub by creativepsyco
    ,
  • Failed: YARN-1325 PreCommit Build #2630
    via by Apache Jenkins Server,
    • 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)

    Users with the same issue

    jf-ast
    2 times, last one,
    jokester
    2 times, last one,
    osvzs
    8 times, last one,
    bernardpaulus
    59 times, last one,
    pulse00
    8 times, last one,
    22 more bugmates