org.junit.ComparisonFailure: expected:<0:[-1]> but was:<0:[0]>

Spring JIRA | Lance S | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Test failure in Windows 7: ConfigTest.testGetDir()

    GitHub | 6 years ago | martincastell
    org.junit.ComparisonFailure: expected:<target[/]indexes> but was:<target[\]indexes>
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    CustomerRegisterValidateTest#testCustomerRegisterRequiredValidate is failed when locale is English(en).

    GitHub | 3 years ago | kazuki43zoo
    org.junit.ComparisonFailure: expected:<Job [ ]is required.> but was:<Job []is required.>
  4. 0

    2 tests failing on Mac build, not in Travis (Linux)

    GitHub | 4 years ago | nimeacuerdo
    org.junit.ComparisonFailure: expected:<...atrixColorFilter<1,0[,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,]0>> but was:<...atrixColorFilter<1,0[0,0,00,0,00,0,00,0,00,0,00,1,00,0,00,0,00, 0,00,0,00,0,00,1,00,0,00,0,00,0,00,0,00,0,00,1,00,0,0]0>>

  1. jf-ast 3 times, last 1 week ago
  2. Casper 1 times, last 3 weeks ago
  3. Dunmer 74 times, last 3 weeks ago
  4. Brian Oxley 7 times, last 3 weeks ago
  5. iferca 2 times, last 1 month ago
8 more registered users
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

    expected:<0:[-1]> but was:<0:[0]>

    at org.junit.Assert.assertEquals()
  2. JUnit
    Assert.assertEquals
    1. org.junit.Assert.assertEquals(Assert.java:123)
    2. org.junit.Assert.assertEquals(Assert.java:145)
    2 frames
  3. foo.bar
    SpringCacheBrokenTest.testCache
    1. foo.bar.SpringCacheBrokenTest.testCache(SpringCacheBrokenTest.java:52)
    1 frame