Examples of TestingServer


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

Examples of com.netflix.curator.test.TestingServer

    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

Examples of com.netflix.curator.test.TestingServer

    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

Examples of org.apache.curator.test.TestingServer

            catch ( KeeperException.ConnectionLossException e )
            {
                // correct
            }

            server = new TestingServer(server.getPort());
            client.checkExists().forPath("/");
        }
        finally
        {
            Closeables.closeQuietly(client);
View Full Code Here

Examples of org.apache.curator.test.TestingServer

                            semaphore.release();
                            if ( retries.incrementAndGet() == MAX_RETRIES )
                            {
                                try
                                {
                                    server = new TestingServer(serverPort);
                                }
                                catch ( Exception e )
                                {
                                    throw new Error(e);
                                }
View Full Code Here

Examples of org.apache.curator.test.TestingServer

            catch ( KeeperException.ConnectionLossException e )
            {
                // expected
            }

            server = new TestingServer(server.getPort(), server.getTempDirectory());
            try
            {
                client.setData().forPath("/test", "test".getBytes());
            }
            catch ( KeeperException.NoAuthException e )
View Full Code Here

Examples of org.apache.curator.test.TestingServer

  protected TestingServer zkServer;
  protected CuratorFramework client;

  @Before
  public void setUp() throws Exception {
    zkServer = new TestingServer();
    client = CuratorFrameworkFactory
        .newClient("localhost:" + zkServer.getPort(),
            new ExponentialBackoffRetry(1000, 3));
    client.start();
View Full Code Here

Examples of org.apache.curator.test.TestingServer

    private TestingServer zooKeeperTestServer;
    private ZooKeeperSamplingTraceFilter traceFilter;

    @Before
    public void setup() throws Exception {
        zooKeeperTestServer = new TestingServer();
        traceFilter = new ZooKeeperSamplingTraceFilter(zooKeeperTestServer.getConnectString(), SAMPLE_RATE_NODE);

    }
View Full Code Here

Examples of org.apache.curator.test.TestingServer

    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_CONNECTION_TIMEOUT, 1000);
        conf.put(Config.STORM_ZOOKEEPER_RETRY_TIMES, 4);
View Full Code Here

Examples of org.apache.curator.test.TestingServer

    private CuratorFramework zookeeper;
    private File logDir;

    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
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.