Package com.avaje.ebeaninternal.server.cluster.mcast.IncomingPacketsProcessed

Examples of com.avaje.ebeaninternal.server.cluster.mcast.IncomingPacketsProcessed.GotAllPoint.processPacket()


  @Test
  public void test() {

    GotAllPoint member = new GotAllPoint("129.12.23.12:9089", 3);

    Assert.assertTrue(member.processPacket(1234));
    Assert.assertTrue(member.processPacket(1235));
    Assert.assertTrue(member.processPacket(1236));

    Assert.assertEquals(1236l, member.getGotAllPoint());
    Assert.assertEquals(0, member.getMissingPackets().size());
View Full Code Here


  public void test() {

    GotAllPoint member = new GotAllPoint("129.12.23.12:9089", 3);

    Assert.assertTrue(member.processPacket(1234));
    Assert.assertTrue(member.processPacket(1235));
    Assert.assertTrue(member.processPacket(1236));

    Assert.assertEquals(1236l, member.getGotAllPoint());
    Assert.assertEquals(0, member.getMissingPackets().size());
View Full Code Here

    GotAllPoint member = new GotAllPoint("129.12.23.12:9089", 3);

    Assert.assertTrue(member.processPacket(1234));
    Assert.assertTrue(member.processPacket(1235));
    Assert.assertTrue(member.processPacket(1236));

    Assert.assertEquals(1236l, member.getGotAllPoint());
    Assert.assertEquals(0, member.getMissingPackets().size());

    Assert.assertFalse(member.processPacket(1234));
View Full Code Here

    Assert.assertTrue(member.processPacket(1236));

    Assert.assertEquals(1236l, member.getGotAllPoint());
    Assert.assertEquals(0, member.getMissingPackets().size());

    Assert.assertFalse(member.processPacket(1234));

    Assert.assertTrue(member.processPacket(1239));
    List<Long> missingPackets = member.getMissingPackets();
    Assert.assertEquals(2, missingPackets.size());
View Full Code Here

    Assert.assertEquals(1236l, member.getGotAllPoint());
    Assert.assertEquals(0, member.getMissingPackets().size());

    Assert.assertFalse(member.processPacket(1234));

    Assert.assertTrue(member.processPacket(1239));
    List<Long> missingPackets = member.getMissingPackets();
    Assert.assertEquals(2, missingPackets.size());

    Assert.assertTrue(missingPackets.contains(1237l));
    Assert.assertTrue(missingPackets.contains(1238l));
View Full Code Here

    Assert.assertTrue(missingPackets.contains(1238l));

    Assert.assertEquals(1236l, member.getGotAllPoint());

    // get a missing packet
    Assert.assertTrue(member.processPacket(1237));
    Assert.assertEquals(1237l, member.getGotAllPoint());

    missingPackets = member.getMissingPackets();
    Assert.assertEquals(1, missingPackets.size());
    Assert.assertTrue(missingPackets.contains(1238l));
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.