@BeforeMethod(groups = {"short", "long"}) @AfterMethod(groups = {"short", "long"}) public void resetClients() { activityClient.clearAllRecordedActivity(); primingClient.clearAllPrimes(); currentClient.enableListener(); }
public void clearActivityLog() { for (Scassandra node : sCluster.nodes()) { node.activityClient().clearAllRecordedActivity(); } }
public void clearActivityLog() { for (Scassandra node : sCluster.nodes()) { node.activityClient().clearAllRecordedActivity(); } }
@BeforeMethod(groups = "short") public void beforeMethod() { cluster = Cluster.builder() .addContactPoints(scassandras.address(1).getAddress()) .withPort(scassandras.getBinaryPort()) .withRetryPolicy(FallthroughRetryPolicy.INSTANCE) .build(); session = cluster.connect(); host1 = TestUtils.findHost(cluster, 1); errors = cluster.getMetrics().getErrorMetrics(); for (Scassandra node : scassandras.nodes()) { node.primingClient().clearAllPrimes(); node.activityClient().clearAllRecordedActivity(); } }
node.activityClient().clearAllRecordedActivity();
assertThat(preparationOne.get(0).getPreparedStatementText()).isEqualTo(query); scassandra.node(1).activityClient().clearAllRecordedActivity(); scassandra.node(1).stop(); assertThat(cluster).host(1).goesDownWithin(10, TimeUnit.SECONDS); if (i == maxTries) throw e; scassandra.node(1).activityClient().clearAllRecordedActivity();
@BeforeMethod(groups = "short") public void beforeMethod() { scassandra = ScassandraCluster.builder().withNodes(3).build(); scassandra.init(); queryOptions = new QueryOptions(); loadBalancingPolicy = new SortingLoadBalancingPolicy(); cluster = Cluster.builder() .addContactPoints(scassandra.address(2).getAddress()) .withPort(scassandra.getBinaryPort()) .withLoadBalancingPolicy(loadBalancingPolicy) .withQueryOptions(queryOptions) .withNettyOptions(nonQuietClusterCloseOptions) .build(); session = cluster.connect(); host1 = TestUtils.findHost(cluster, 1); host2 = TestUtils.findHost(cluster, 2); host3 = TestUtils.findHost(cluster, 3); // Make sure there are no prepares for (int host : Lists.newArrayList(1, 2, 3)) { assertThat(scassandra.node(host).activityClient().retrievePreparedStatementPreparations()) .hasSize(0); scassandra.node(host).activityClient().clearAllRecordedActivity(); } }
@BeforeMethod(groups = "short") public void beforeMethod() { scassandras = ScassandraCluster.builder().withNodes(3).build(); scassandras.init(); cluster = Cluster.builder() .addContactPoints(scassandras.address(1).getAddress()) .withPort(scassandras.getBinaryPort()) .withRetryPolicy(retryPolicy) .withLoadBalancingPolicy(new SortingLoadBalancingPolicy()) .withPoolingOptions( new PoolingOptions() .setCoreConnectionsPerHost(HostDistance.LOCAL, 1) .setMaxConnectionsPerHost(HostDistance.LOCAL, 1) .setHeartbeatIntervalSeconds(0)) .withNettyOptions(nonQuietClusterCloseOptions) // Mark everything as idempotent by default so RetryPolicy is exercised. .withQueryOptions(new QueryOptions().setDefaultIdempotence(true)) .build(); session = cluster.connect(); host1 = TestUtils.findHost(cluster, 1); host2 = TestUtils.findHost(cluster, 2); host3 = TestUtils.findHost(cluster, 3); errors = cluster.getMetrics().getErrorMetrics(); Mockito.reset(retryPolicy); for (Scassandra node : scassandras.nodes()) { node.activityClient().clearAllRecordedActivity(); } }
@BeforeMethod(groups = {"short", "long"}) @AfterMethod(groups = {"short", "long"}) public void resetClients() { activityClient.clearAllRecordedActivity(); primingClient.clearAllPrimes(); currentClient.enableListener(); }
public void clearActivityLog() { for (Scassandra node : sCluster.nodes()) { node.activityClient().clearAllRecordedActivity(); } }
public void clearActivityLog() { for (Scassandra node : sCluster.nodes()) { node.activityClient().clearAllRecordedActivity(); } }
@Override public void evaluate() throws Throwable { if (!started) { started = true; scassandra.start(); try { base.evaluate(); } finally { scassandra.stop(); started = false; } } else { primingClient().clearAllPrimes(); activityClient().clearAllRecordedActivity(); base.evaluate(); } } };
@BeforeMethod(groups = "short") public void beforeMethod() { cluster = Cluster.builder() .addContactPoints(scassandras.address(1).getAddress()) .withPort(scassandras.getBinaryPort()) .withRetryPolicy(FallthroughRetryPolicy.INSTANCE) .build(); session = cluster.connect(); host1 = TestUtils.findHost(cluster, 1); errors = cluster.getMetrics().getErrorMetrics(); for (Scassandra node : scassandras.nodes()) { node.primingClient().clearAllPrimes(); node.activityClient().clearAllRecordedActivity(); } }
node.activityClient().clearAllRecordedActivity();
assertThat(preparationOne.get(0).getPreparedStatementText()).isEqualTo(query); scassandra.node(1).activityClient().clearAllRecordedActivity(); scassandra.node(1).stop(); assertThat(cluster).host(1).goesDownWithin(10, TimeUnit.SECONDS); if (i == maxTries) throw e; scassandra.node(1).activityClient().clearAllRecordedActivity();
@BeforeMethod(groups = "short") public void beforeMethod() { scassandra = ScassandraCluster.builder().withNodes(3).build(); scassandra.init(); queryOptions = new QueryOptions(); loadBalancingPolicy = new SortingLoadBalancingPolicy(); cluster = Cluster.builder() .addContactPoints(scassandra.address(2).getAddress()) .withPort(scassandra.getBinaryPort()) .withLoadBalancingPolicy(loadBalancingPolicy) .withQueryOptions(queryOptions) .withNettyOptions(nonQuietClusterCloseOptions) .build(); session = cluster.connect(); host1 = TestUtils.findHost(cluster, 1); host2 = TestUtils.findHost(cluster, 2); host3 = TestUtils.findHost(cluster, 3); // Make sure there are no prepares for (int host : Lists.newArrayList(1, 2, 3)) { assertThat(scassandra.node(host).activityClient().retrievePreparedStatementPreparations()) .hasSize(0); scassandra.node(host).activityClient().clearAllRecordedActivity(); } }
@BeforeMethod(groups = "short") public void beforeMethod() { scassandras = ScassandraCluster.builder().withNodes(3).build(); scassandras.init(); cluster = Cluster.builder() .addContactPoints(scassandras.address(1).getAddress()) .withPort(scassandras.getBinaryPort()) .withRetryPolicy(retryPolicy) .withLoadBalancingPolicy(new SortingLoadBalancingPolicy()) .withPoolingOptions( new PoolingOptions() .setCoreConnectionsPerHost(HostDistance.LOCAL, 1) .setMaxConnectionsPerHost(HostDistance.LOCAL, 1) .setHeartbeatIntervalSeconds(0)) .withNettyOptions(nonQuietClusterCloseOptions) // Mark everything as idempotent by default so RetryPolicy is exercised. .withQueryOptions(new QueryOptions().setDefaultIdempotence(true)) .build(); session = cluster.connect(); host1 = TestUtils.findHost(cluster, 1); host2 = TestUtils.findHost(cluster, 2); host3 = TestUtils.findHost(cluster, 3); errors = cluster.getMetrics().getErrorMetrics(); Mockito.reset(retryPolicy); for (Scassandra node : scassandras.nodes()) { node.activityClient().clearAllRecordedActivity(); } }