Package com.netflix.curator.test

Examples of com.netflix.curator.test.TestingServer


    private SimpleConsumer simpleConsumer;

    @Before
    public void setUp() throws Exception {
        MockitoAnnotations.initMocks(this);
        server = new TestingServer();
        String connectionString = server.getConnectString();
        ZkHosts hosts = new ZkHosts(connectionString);
        hosts.refreshFreqSecs = 1;
        spoutConfig = new SpoutConfig(hosts, "topic", "/test", "id");
        Map conf = buildZookeeperConfig(server);
View Full Code Here


    private CuratorFramework zookeeper;
    private TestingServer server;

    @Before
    public void setUp() throws Exception {
        server = new TestingServer();
        String connectionString = server.getConnectString();
        Map conf = new HashMap();
        conf.put(Config.STORM_ZOOKEEPER_SESSION_TIMEOUT, 1000);
        conf.put(Config.STORM_ZOOKEEPER_RETRY_TIMES, 4);
        conf.put(Config.STORM_ZOOKEEPER_RETRY_INTERVAL, 5);
View Full Code Here

    private TestingServer server;
    private CuratorFramework zookeeper;

    public KafkaTestBroker() {
        try {
            server = new TestingServer();
            String zookeeperConnectionString = server.getConnectString();
            ExponentialBackoffRetry retryPolicy = new ExponentialBackoffRetry(1000, 3);
            zookeeper = CuratorFrameworkFactory.newClient(zookeeperConnectionString, retryPolicy);
            zookeeper.start();
            port = InstanceSpec.getRandomPort();
View Full Code Here

    private TestingServer _zkServer;
    private ZkClient _zkClient;

    @Before
    public void setUp() throws Exception {
        _zkServer = new TestingServer(4711);
        _zkClient = ZkTestSystem.createZkClient(_zkServer.getConnectString());
    }
View Full Code Here

    private ZkClient _zkClient;

    @Before
    public void setUp() throws Exception {
        LOG.info("------------ BEFORE -------------");
        _zkServer = new TestingServer(4711);
        _zkClient = ZkTestSystem.createZkClient(_zkServer.getConnectString());
    }
View Full Code Here

public class ServerZkClientTest extends AbstractBaseZkClientTest {
    @Override
    @Before
    public void setUp() throws Exception {
        super.setUp();
        _zkServer = new TestingServer(4711);
        _client = ZkTestSystem.createZkClient("localhost:4711");
    }
View Full Code Here

    private ZkClient _zkClient;

    private ZkTestSystem() {
        LOG.info("~~~~~~~~~~~~~~~ starting zk system ~~~~~~~~~~~~~~~");
        try {
            _zkServer = new TestingServer(PORT);
            _zkClient = ZkTestSystem.createZkClient(_zkServer.getConnectString());
        }
        catch ( Exception e ) {
            throw new RuntimeException(e);
        }
View Full Code Here

    protected TestingServer _zkServer;
    protected ZkClient _client;

    public void testToString() throws Exception {
        _zkServer = new TestingServer(4711);
        _client = ZkTestSystem.createZkClient("localhost:4711");
        final String file1 = "/files/file1";
        final String file2 = "/files/file2";
        final String file3 = "/files/file2/file3";
        _client.createPersistent(file1, true);
View Full Code Here

        Closeables.closeQuietly(_zooKeeperServer);
    }

    public void startZooKeeper() throws Exception {
        _zooKeeperServer = new TestingServer(_instanceSpec);
    }
View Full Code Here

    private SimpleMailbox<Long> mailboxLong;
    private UUID randomUUID = UUID.randomUUID();

    @Before
    public void setUp() throws Exception {
        testServer = new TestingServer(ZOO_TEST_PORT);
        client = CuratorFrameworkFactory.builder().connectString("localhost:" + ZOO_TEST_PORT).retryPolicy(retryPolicy).
                namespace("JAMES").build();
        client.start();
        uuidProvider = new ZooUidProvider<UUID>(client, retryPolicy);
        longProvider = new ZooUidProvider<Long>(client, retryPolicy);
View Full Code Here

TOP

Related Classes of com.netflix.curator.test.TestingServer

Copyright © 2018 www.massapicom. 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.