Examples of killServer()


Examples of org.apache.curator.test.TestingCluster.killServer()

            selector.autoRequeue();
            selector.start();
            Assert.assertTrue(timing.acquireSemaphore(semaphore));

            InstanceSpec connectionInstance = cluster.findConnectionInstance(client.getZookeeperClient().getZooKeeper());
            cluster.killServer(connectionInstance);

            Assert.assertTrue(timing.multiple(4).acquireSemaphore(semaphore));
        }
        finally
        {
View Full Code Here

Examples of org.apache.curator.test.TestingCluster.killServer()

            client.create().forPath("/test/three");

            Assert.assertTrue(latch.get().await(10, TimeUnit.SECONDS));

            InstanceSpec connectionInstance = cluster.findConnectionInstance(client.getZookeeperClient().getZooKeeper());
            cluster.killServer(connectionInstance);

            Assert.assertTrue(timing.awaitLatch(reconnectLatch));

            Assert.assertEquals(cache.getCurrentData().size(), 3);
        }
View Full Code Here

Examples of org.apache.curator.test.TestingCluster.killServer()

                InstanceSpec                killInstance = iterator.next();
                if ( killInstance.equals(ourInstance) )
                {
                    killInstance = iterator.next(); // kill the instance we're not connected to
                }
                cluster.killServer(killInstance);

                Assert.assertEquals(reconnectedLatch.getCount(), 1);
                Assert.assertTrue(timing.awaitLatch(readOnlyLatch));

                Assert.assertEquals(reconnectedLatch.getCount(), 1);
View Full Code Here

Examples of org.apache.curator.test.TestingCluster.killServer()

            client.create().withMode(CreateMode.EPHEMERAL).forPath("/temp", "value".getBytes());
            Assert.assertNotNull(client.checkExists().forPath("/temp"));

            for ( InstanceSpec spec : cluster.getInstances() )
            {
                cluster.killServer(spec);
                timing.forWaiting().sleepABit();
                cluster.restartServer(spec);
                timing.sleepABit();
            }
View Full Code Here

Examples of org.apache.curator.test.TestingCluster.killServer()

            for ( InstanceSpec instanceSpec : cluster.getInstances() )
            {
                if ( !instanceSpec.equals(cluster.findConnectionInstance(client.getZookeeperClient().getZooKeeper())) )
                {
                    Assert.assertTrue(cluster.killServer(instanceSpec));
                }
            }

            Assert.assertTrue(timing.awaitLatch(latch));
        }
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.