@BeforeMethod(groups = {"short", "long"}) @AfterMethod(groups = {"short", "long"}) public void resetClients() { activityClient.clearAllRecordedActivity(); primingClient.clearAllPrimes(); currentClient.enableListener(); }
currentClient.closeConnections(CLOSE); TestUtils.waitForDown(TestUtils.IP_PREFIX + "1", cluster); currentClient.enableListener(); TestUtils.waitForUp(TestUtils.IP_PREFIX + "1", cluster);
currentClient.enableListener();
currentClient.enableListener();
currentClient.enableListener(); Uninterruptibles.sleepUninterruptibly(reconnectInterval, TimeUnit.MILLISECONDS);
currentClient.enableListener();
assertThat(cluster).hasOpenControlConnection(); currentClient.enableListener();
/** * Ensures that if all connections fail to a host on pool init that the host is marked down. * * @jira_ticket JAVA-544 * @test_category connection:connection_pool * @since 2.0.11 */ @Test(groups = "short") public void should_mark_host_down_if_all_connections_fail_on_init() { // Prevent any connections on node 2. scassandra.node(2).currentClient().disableListener(); createCluster(8, 8); // Node 2 should be in a down state while node 1 stays up. assertThat(cluster).host(2).goesDownWithin(10, SECONDS); assertThat(cluster).host(1).isUp(); // Node 2 should come up as soon as it is able to reconnect. scassandra.node(2).currentClient().enableListener(); assertThat(cluster).host(2).comesUpWithin(2, SECONDS); }
@BeforeMethod(groups = {"short", "long"}) @AfterMethod(groups = {"short", "long"}) public void resetClients() { activityClient.clearAllRecordedActivity(); primingClient.clearAllPrimes(); currentClient.enableListener(); }
currentClient.closeConnections(CLOSE); TestUtils.waitForDown(TestUtils.IP_PREFIX + "1", cluster); currentClient.enableListener(); TestUtils.waitForUp(TestUtils.IP_PREFIX + "1", cluster);
currentClient.enableListener();
currentClient.enableListener(); Uninterruptibles.sleepUninterruptibly(reconnectInterval, TimeUnit.MILLISECONDS);
currentClient.enableListener();
currentClient.enableListener();
/** * Ensures that if all connections fail to a host on pool init that the host is marked down. * * @jira_ticket JAVA-544 * @test_category connection:connection_pool * @since 2.0.11 */ @Test(groups = "short") public void should_mark_host_down_if_all_connections_fail_on_init() { // Prevent any connections on node 2. scassandra.node(2).currentClient().disableListener(); createCluster(8, 8); // Node 2 should be in a down state while node 1 stays up. assertThat(cluster).host(2).goesDownWithin(10, SECONDS); assertThat(cluster).host(1).isUp(); // Node 2 should come up as soon as it is able to reconnect. scassandra.node(2).currentClient().enableListener(); assertThat(cluster).host(2).comesUpWithin(2, SECONDS); }
assertThat(cluster).hasOpenControlConnection(); currentClient.enableListener();