This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TomP2PMessageTest { | |
@Test | |
public void testMessaging() throws IOException, InterruptedException { | |
Peer peer = new PeerMaker( Number160.ONE ).setPorts( 4000 ).makeAndListen(); | |
int numberOfItems = 10000; | |
final CountDownLatch latch = new CountDownLatch( numberOfItems ); | |
peer.setObjectDataReply( new ObjectDataReply() { | |
@Override | |
public Object reply( PeerAddress sender, Object request ) throws Exception { |