Package com.netflix.curator.test

Examples of com.netflix.curator.test.TestingServer


    public static void main(String[] args) {
        TestKafkaProducer tkp = null;

        boolean success = false;

        try (TestingServer zookeeperTestServer =  new TestingServer())  {

            final String theTopic = "someTopic-" + new Random().nextInt();

            tkp = new TestKafkaProducer(
                    theTopic,
                    "localhost:" + zookeeperTestServer.getPort(),
                    10);

            tkp.sendMessages();

            tkp.consumeMessages();
View Full Code Here


    public static void main(String[] args) {
        TestKafkaProducer tkp = null;

        boolean success = false;

        try (TestingServer zookeeperTestServer =  new TestingServer())  {

            final String theTopic = "someTopic-" + new Random().nextInt();

            tkp = new TestKafkaProducer(
                    theTopic,
                    "localhost:" + zookeeperTestServer.getPort(),
                    4400);

            tkp.sendMessages();
            tkp.consumeMessages();
View Full Code Here

        {
            tempFile =
                new File(String.format("/tmp/TestZkServerListener-%s", randomUUID().toString()));
            tempFile.mkdir();
            tempFile.deleteOnExit();
            zkTestServer = new TestingServer(ZK_PORT_TEST, tempFile);
            LOGGER.info("zookeeper server running at {}", ZK_PORT_TEST);
        }
        catch (Exception e)
        {
            throw new RuntimeException(e);
View Full Code Here

    public KafkaTest() {}
   
    public void run() {
        try {
            server = new TestingServer();
            zookeeperConnectionString = server.getConnectString();
            ExponentialBackoffRetry retryPolicy = new ExponentialBackoffRetry(
                    1000, 3);
            CuratorFramework zookeeper = CuratorFrameworkFactory.newClient(
                    zookeeperConnectionString, 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.