org.junit.ComparisonFailure: expected:<host[]:999> but was:<host[/10.1.0.47]:999>

GitHub | mtunique | 5 months 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

    NetworkUtilsTest.testGetInetSocketAddress when can get host1 ip

    GitHub | 5 months ago | mtunique
    org.junit.ComparisonFailure: expected:<host[]:999> but was:<host[/10.1.0.47]:999>
  2. 0

    AlertingTest failing in json comparison

    GitHub | 3 years ago | sammefford
    org.junit.ComparisonFailure: expected:<...ule-metadata":null}}[]> but was:<...ule-metadata":null}}[ ]>
  3. 0

    Running the tests, deploying to an internal maven, & updating versions

    GitHub | 2 years ago | jtruelove
    org.junit.ComparisonFailure: expected:<[error]> but was:<[ok]>
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Cookies tests are flaky

    GitHub | 3 years ago | seato
    org.junit.ComparisonFailure: expected:<[GM]20527.group.on> but was:<[gm]20527.group.on>
  6. 0

    Cutting on stack call

    GitHub | 4 years ago | stanl3y
    org.junit.ComparisonFailure: expected:<[1.000 2.000 ]> but was:<[ 1.000 2.000 ]>
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:<host[]:999> but was:<host[/10.1.0.47]:999>

    at org.junit.Assert.assertEquals()
  2. JUnit
    Assert.assertEquals
    1. org.junit.Assert.assertEquals(Assert.java:115)
    2. org.junit.Assert.assertEquals(Assert.java:144)
    2 frames
  3. com.twitter.heron
    NetworkUtilsTest.testGetInetSocketAddress
    1. com.twitter.heron.spi.utils.NetworkUtilsTest.testGetInetSocketAddress(NetworkUtilsTest.java:275)
    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:498)
    4 frames
  5. JUnit
    TestMethod.invoke
    1. org.junit.internal.runners.TestMethod.invoke(TestMethod.java:68)
    1 frame
  6. powermock-module-junit4
    PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runTestMethod
    1. org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:310)
    1 frame
  7. JUnit
    MethodRoadie.runBeforesThenTestThenAfters
    1. org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:88)
    2. org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:96)
    2 frames
  8. powermock-module-junit4
    PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters
    1. org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(PowerMockJUnit44RunnerDelegateImpl.java:294)
    2. org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTestInSuper(PowerMockJUnit47RunnerDelegateImpl.java:127)
    3. org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTest(PowerMockJUnit47RunnerDelegateImpl.java:82)
    4. org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:282)
    4 frames
  9. JUnit
    MethodRoadie.run
    1. org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:86)
    2. org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49)
    2 frames
  10. powermock-module-junit4
    PowerMockJUnit44RunnerDelegateImpl$1.run
    1. org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:207)
    2. org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:146)
    3. org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:120)
    3 frames
  11. JUnit
    ClassRoadie.runProtected
    1. org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:33)
    2. org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:45)
    2 frames
  12. powermock-module-junit4
    PowerMockJUnit44RunnerDelegateImpl.run
    1. org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:122)
    1 frame
  13. powermock-module-junit4-common
    AbstractCommonPowerMockRunner.run
    1. org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:106)
    2. org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:53)
    2 frames
  14. powermock-module-junit4
    PowerMockRunner.run
    1. org.powermock.modules.junit4.PowerMockRunner.run(PowerMockRunner.java:59)
    1 frame
  15. com.google.testing
    CancellableRequestFactory$CancellableRunner.run
    1. com.google.testing.junit.runner.junit4.CancellableRequestFactory$CancellableRunner.run(CancellableRequestFactory.java:89)
    1 frame
  16. JUnit
    JUnitCore.run
    1. org.junit.runner.JUnitCore.run(JUnitCore.java:160)
    2. org.junit.runner.JUnitCore.run(JUnitCore.java:138)
    2 frames
  17. com.google.testing
    BazelTestRunner.main
    1. com.google.testing.junit.runner.junit4.JUnit4Runner.run(JUnit4Runner.java:114)
    2. com.google.testing.junit.runner.BazelTestRunner.runTestsInSuite(BazelTestRunner.java:152)
    3. com.google.testing.junit.runner.BazelTestRunner.main(BazelTestRunner.java:91)
    3 frames