GOSSIP-40 bad hashcode (Lai Donglin via EGC)

This commit is contained in:
Edward Capriolo
2017-01-13 17:31:02 -05:00
parent 4f4c15cb07
commit bc96cf6d34
2 changed files with 22 additions and 4 deletions

View File

@ -0,0 +1,22 @@
package org.apache.gossip;
import java.net.URI;
import java.net.URISyntaxException;
import org.junit.Assert;
import org.junit.jupiter.api.Test;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.runner.RunWith;
@RunWith(JUnitPlatform.class)
public class GossipMemberTest {
@Test
public void testHashCodeFromGossip40() throws URISyntaxException {
Assert.assertNotEquals(
new LocalGossipMember("mycluster", new URI("udp://4.4.4.4:1000"), "myid", 1, 10, 5)
.hashCode(),
new LocalGossipMember("mycluster", new URI("udp://4.4.4.5:1005"), "yourid", 11, 11, 6)
.hashCode());
}
}

View File

@ -19,8 +19,6 @@ package org.apache.gossip;
import org.apache.log4j.Logger;
import io.teknek.tunit.TUnit;
import org.junit.jupiter.api.Test;
import java.io.File;
@ -30,8 +28,6 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.UUID;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.runner.RunWith;