Package org.springframework.xd.dirt.zookeeper

Examples of org.springframework.xd.dirt.zookeeper.EmbeddedZooKeeper.start()


public class ZookeeperTests {

  @Test
  public void test() throws Exception {
    EmbeddedZooKeeper zkServer = new EmbeddedZooKeeper(5555);
    zkServer.start();
    ZooKeeperConnection zkConnection = new ZooKeeperConnection("localhost:5555");
    zkConnection.start();
    CuratorFramework client = zkConnection.getClient();
    PathChildrenCache cache = new PathChildrenCache(client, Paths.build(Paths.STREAMS), true);
    cache.getListenable().addListener(new ListenerOne());
View Full Code Here


  @Before
  public void setUp() {
    MockitoAnnotations.initMocks(this);
    EmbeddedZooKeeper embeddedZooKeeper = new EmbeddedZooKeeper();
    embeddedZooKeeper.start();
    ZooKeeperConnection zkConnection = new ZooKeeperConnection("localhost:" + embeddedZooKeeper.getClientPort());
    zkConnection.start();
    while (!zkConnection.isConnected()) {
      try {
        Thread.sleep(100);
View Full Code Here

  @Before
  public void setup() throws BindException {
    System.setProperty("XD_TRANSPORT", "local");
    MockitoAnnotations.initMocks(this);
    EmbeddedZooKeeper embeddedZooKeeper = new EmbeddedZooKeeper();
    embeddedZooKeeper.start();
    this.zkConnection = new ZooKeeperConnection("localhost:" + embeddedZooKeeper.getClientPort());
    zkConnection.start();
    while (!zkConnection.isConnected()) {
      try {
        Thread.sleep(100);
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.