Examples of failedReason()


Examples of net.tomp2p.futures.FutureResponse.failedReason()

            GetBuilder getBuilder = new GetBuilder(recv1, new Number160(33));
            getBuilder.domainKey(Number160.createHash("test"));
            fr = smmSender.get(recv1.peerAddress(), getBuilder, cc);
            Thread.sleep(5);
            fr.cancel();
            System.err.println("XX:" + fr.failedReason());
            Assert.assertEquals(false, fr.isSuccess());
        } finally {
            if (cc != null) {
                cc.shutdown().awaitListenersUninterruptibly();
            }
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

          LOG.debug("Successfully set up the reverse connection to peer {}", message.recipient().peerId());
          rconResponse.response(msg);
        } else {
          LOG.debug("Could not acquire a reverse connection to peer {}", message.recipient().peerId());
          rconResponse.failed("Could not acquire a reverse connection");
          futureResponse.failed(rconResponse.failedReason());
        }
      }
    };
   
    // send reverse connection request instead of normal message
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

            d.forceTCP();
            FutureResponse fr = neighbors2.closeNeighbors(sender.peerAddress(), v,
                    Type.REQUEST_2, cc, d);

            fr.awaitUninterruptibly();
            System.err.println(fr.failedReason());
            // Thread.sleep(10000000);
            Assert.assertEquals(true, fr.isSuccess());
            NeighborSet pas = fr.responseMessage().neighborsSet(0);
            // we are able to fit 40 neighbors into 1400 bytes
            Assert.assertEquals(33, pas.size());
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

                FutureResponse fr3 = sender.pingRPC().pingTCP(recv1.peerAddress(), cc, new DefaultConnectionConfiguration());
                fr1.awaitUninterruptibly();
                fr2.awaitUninterruptibly();
                fr3.awaitUninterruptibly();
                System.err.println(fr1.failedReason() + " / " + fr2.failedReason() + " / "
                        + fr3.failedReason());
                Assert.assertEquals(true, fr1.isSuccess());
                Assert.assertEquals(true, fr2.isSuccess());
                Assert.assertEquals(true, fr3.isSuccess());
            }
        } catch (Throwable t) {
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

                FutureResponse fr3 = sender.pingRPC().pingUDP(recv1.peerAddress(), cc, new DefaultConnectionConfiguration());
                fr1.awaitUninterruptibly();
                fr2.awaitUninterruptibly();
                fr3.awaitUninterruptibly();
                System.err.println(fr1.failedReason() + " / " + fr2.failedReason() + " / "
                        + fr3.failedReason());
                Assert.assertEquals(true, fr1.isSuccess());
                Assert.assertEquals(true, fr2.isSuccess());
                Assert.assertEquals(true, fr3.isSuccess());
            }
        } catch (Throwable t) {
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

            cc = fcc.channelCreator();
            FutureResponse fr = handshake.pingTCP(recv1.peerBean().serverPeerAddress(), cc,
                    new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
            Assert.assertEquals(false, fr.isSuccess());
            System.err.println("done:" + fr.failedReason());
            Assert.assertEquals(true, fr.failedReason().contains("/ timeout"));
           
        } finally {
            if (cc != null) {
                cc.shutdown().await();
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

            FutureResponse fr = handshake.pingTCP(recv1.peerBean().serverPeerAddress(), cc,
                    new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
            Assert.assertEquals(false, fr.isSuccess());
            System.err.println("done:" + fr.failedReason());
            Assert.assertEquals(true, fr.failedReason().contains("/ timeout"));
           
        } finally {
            if (cc != null) {
                cc.shutdown().await();
            }
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

            cc = fcc.channelCreator();
            FutureResponse fr = handshake.pingUDP(recv1.peerBean().serverPeerAddress(), cc,
                    new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
            Assert.assertEquals(false, fr.isSuccess());
            System.err.println("done:" + fr.failedReason());
            Assert.assertEquals(true, fr.failedReason().contains("/ timeout"));
        } finally {
            if (cc != null) {
                cc.shutdown().await();
            }
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

            FutureResponse fr = handshake.pingUDP(recv1.peerBean().serverPeerAddress(), cc,
                    new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
            Assert.assertEquals(false, fr.isSuccess());
            System.err.println("done:" + fr.failedReason());
            Assert.assertEquals(true, fr.failedReason().contains("/ timeout"));
        } finally {
            if (cc != null) {
                cc.shutdown().await();
            }
            if (sender != null) {
View Full Code Here

Examples of net.tomp2p.futures.FutureTracker.failedReason()

            tc = new TrackerConfiguration(1, 1, 0, 1);
            ft = nodes[301].getTracker(trackerID).domainKey(Number160.createHash("test"))
                    .routingConfiguration(rc).trackerConfiguration(tc)
                    .evaluatingScheme(new VotingSchemeTracker()).start();
            ft.awaitUninterruptibly();
            System.err.println(ft.failedReason());
            Assert.assertEquals(true, ft.isSuccess());
            Assert.assertEquals(1, ft.rawPeersOnTracker().size());
        } finally {
            if (master != null) {
                master.peer().shutdown().await();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.