java.lang.AssertionError

expected:<2> but was:<4>


Samebug tips1

Check your pattern declaration or check your assert declaration.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.


Solutions on the web5797

Solution icon of github
expected:<2> but was:<4>

Solution icon of github
via GitHub by davidmoten
, 1 year ago
expected:<2> but was:<4>

Solution icon of github
expected:<2> but was:<4>

Solution icon of github
via GitHub by sancar
, 1 year ago
expected:<4> but was:<2>

Solution icon of apache
via hadoop-mapreduce-dev by Apache Jenkins Server, 1 year ago
Unexpected number of live nodes: expected:<4> but was:<2>

Solution icon of github
expected:<[1, 4, 2, 3, 0, 5]> but was:<[1, 2, 0, 4, 3, 5]>

Solution icon of github
via GitHub by hyleung
, 1 year ago
expected:<4> but was:<3>

Solution icon of github
via GitHub by keith-turner
, 4 months ago
expected:<4> but was:<6>

Solution icon of github
via GitHub by korry8911
, 8 months ago
expected:<5> but was:<4>

Solution icon of github
expected:<4> but was:<0>

Stack trace

  • java.lang.AssertionError: expected:<2> but was:<4> at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:645) at org.junit.Assert.assertEquals(Assert.java:631) at com.hazelcast.client.heartbeat.ClientHeartbeatTest$6.run(ClientHeartbeatTest.java:264) at com.hazelcast.test.HazelcastTestSupport.assertTrueAllTheTime(HazelcastTestSupport.java:895) at com.hazelcast.client.heartbeat.ClientHeartbeatTest.testClientEndpointsDelaySeconds_whenHeartbeatResumed(ClientHeartbeatTest.java:261)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

3 times, 2 weeks ago
2 times, 2 weeks ago
Once, 1 month ago
2 times, 1 month ago
Once, 2 months ago
98 more bugmates