Package net.kuujo.copycat.test

Examples of net.kuujo.copycat.test.TestCluster.start()


      .withState(CopycatState.LEADER)
      .withCommitIndex(6)
      .withLastApplied(6);
    cluster.addNode(node3);

    cluster.start();

    node1.stateMachine().data("Hello world!");

    AtomicBoolean compacted = new AtomicBoolean();
    node1.log().on().compacted(() -> compacted.set(true));
View Full Code Here


      .withState(CopycatState.LEADER)
      .withCommitIndex(999)
      .withLastApplied(999);
    cluster.addNode(node3);

    cluster.start();

    Assert.assertEquals(800, node2.log().firstIndex());
    Entry firstEntry = node2.log().firstEntry();
    Assert.assertTrue(firstEntry instanceof SnapshotEntry);
    Assert.assertEquals("Hello world!", new String(((SnapshotEntry) firstEntry).data()));
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.