Package com.datastax.driver.core

Examples of com.datastax.driver.core.CCMBridge$CCMCluster


public class CloseableLoadBalancingPolicyTest {
    @Test(groups = "short")
    public void should_be_invoked_at_shutdown() {
        CloseMonitoringPolicy policy = new CloseMonitoringPolicy(Policies.defaultLoadBalancingPolicy());
        CCMBridge ccm = null;
        Cluster cluster = null;
        try {
            ccm = CCMBridge.create("test", 1);
            cluster = Cluster.builder()
                             .addContactPoint(CCMBridge.ipOfNode(1))
                             .withLoadBalancingPolicy(policy)
                             .build();
            cluster.connect();
        } finally {
            if (cluster != null)
                cluster.close();
            if (ccm != null)
                ccm.remove();
        }
        assertThat(policy.wasClosed).isTrue();
    }
View Full Code Here

TOP

Related Classes of com.datastax.driver.core.CCMBridge$CCMCluster

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.