diff --git a/.circleci/config.yml b/.circleci/config.yml index 70b12296f..4f64f9afc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,8 +53,6 @@ jobs: ccm populate --vnodes -n 2:2 sed -i 's/etc\/cassandra\/jmxremote.password/home\/circleci\/.local\/jmxremote.password/' /home/circleci/.ccm/test/node1/conf/cassandra-env.sh sed -i 's/etc\/cassandra\/jmxremote.password/home\/circleci\/.local\/jmxremote.password/' /home/circleci/.ccm/test/node2/conf/cassandra-env.sh - sed -i 's/etc\/cassandra\/jmxremote.password/home\/circleci\/.local\/jmxremote.password/' /home/circleci/.ccm/test/node3/conf/cassandra-env.sh - sed -i 's/etc\/cassandra\/jmxremote.password/home\/circleci\/.local\/jmxremote.password/' /home/circleci/.ccm/test/node4/conf/cassandra-env.sh sed -i 's/#MAX_HEAP_SIZE="4G"/MAX_HEAP_SIZE="192m"/' /home/circleci/.ccm/test/node1/conf/cassandra-env.sh sed -i 's/#MAX_HEAP_SIZE="4G"/MAX_HEAP_SIZE="192m"/' /home/circleci/.ccm/test/node2/conf/cassandra-env.sh sed -i 's/#MAX_HEAP_SIZE="4G"/MAX_HEAP_SIZE="192m"/' /home/circleci/.ccm/test/node3/conf/cassandra-env.sh @@ -92,12 +90,19 @@ jobs: ccm checklogerror MAVEN_OPTS="-Xmx1g" mvn clean install # TODO: parallelise the following - mvn surefire:test -Dtest=ReaperIT - mvn surefire:test -Dtest=ReaperH2IT + mvn surefire:test -Dtest=ReaperNoIncrementalIT + mvn surefire:test -Dtest=ReaperH2NoIncrementalIT #mvn surefire:test -Dtest=ReaperPostgresIT # TODO set up postgres - mvn surefire:test -DsurefireArgLine="-Xmx1g" -Dtest=ReaperCassandraIT - mvn surefire:test -DsurefireArgLine="-Xmx1g" -Dtest=ReaperCassandraIT -Dgrim.reaper.min=2 -Dgrim.reaper.max=2 - mvn surefire:test -DsurefireArgLine="-Xmx1g" -Dtest=ReaperCassandraIT -Dgrim.reaper.min=2 -Dgrim.reaper.max=4 + mvn surefire:test -DsurefireArgLine="-Xmx1g" -Dtest=ReaperCassandraNoIncrementalIT + mvn surefire:test -DsurefireArgLine="-Xmx1g" -Dtest=ReaperCassandraNoIncrementalIT -Dgrim.reaper.min=2 -Dgrim.reaper.max=2 + mvn surefire:test -DsurefireArgLine="-Xmx1g" -Dtest=ReaperCassandraNoIncrementalIT -Dgrim.reaper.min=2 -Dgrim.reaper.max=4 + sed -i 's/etc\/cassandra\/jmxremote.password/home\/circleci\/.local\/jmxremote.password/' /home/circleci/.ccm/test/node3/conf/cassandra-env.sh + sed -i 's/etc\/cassandra\/jmxremote.password/home\/circleci\/.local\/jmxremote.password/' /home/circleci/.ccm/test/node4/conf/cassandra-env.sh + ccm node3 stop + ccm node3 start + ccm node4 stop + ccm node4 start + mvn surefire:test -DsurefireArgLine="-Xmx1g" -Dtest=ReaperCassandraIncrementalIT -Dgrim.reaper.min=2 -Dgrim.reaper.max=4 - store_test_results: path: src/server/target/surefire-reports diff --git a/src/server/src/main/java/io/cassandrareaper/ReaperApplication.java b/src/server/src/main/java/io/cassandrareaper/ReaperApplication.java index db7789506..dff859c90 100644 --- a/src/server/src/main/java/io/cassandrareaper/ReaperApplication.java +++ b/src/server/src/main/java/io/cassandrareaper/ReaperApplication.java @@ -14,6 +14,7 @@ package io.cassandrareaper; +import io.cassandrareaper.ReaperApplicationConfiguration.DatacenterAvailability; import io.cassandrareaper.ReaperApplicationConfiguration.JmxCredentials; import io.cassandrareaper.jmx.JmxConnectionFactory; import io.cassandrareaper.jmx.JmxConnectionsInitializer; @@ -253,6 +254,11 @@ public void run(ReaperApplicationConfiguration config, Environment environment) initializeJmxSeedsForAllClusters(); LOG.info("resuming pending repair runs"); + Preconditions.checkState( + context.storage instanceof IDistributedStorage + || DatacenterAvailability.EACH != context.config.getDatacenterAvailability(), + "Cassandra backend storage is the only one allowing EACH datacenter availability modes."); + if (context.storage instanceof IDistributedStorage) { // Allowing multiple Reaper instances to work concurrently requires // us to poll the database for running repairs regularly diff --git a/src/server/src/main/java/io/cassandrareaper/service/SegmentRunner.java b/src/server/src/main/java/io/cassandrareaper/service/SegmentRunner.java index 213d11af2..1b7ae8f2b 100644 --- a/src/server/src/main/java/io/cassandrareaper/service/SegmentRunner.java +++ b/src/server/src/main/java/io/cassandrareaper/service/SegmentRunner.java @@ -589,17 +589,20 @@ Callable>> getNodeMetrics(String node, String return () -> { LOG.debug("getMetricsForHost {} / {} / {}", node, localDc, nodeDc); - if (DatacenterAvailability.ALL != context.config.getDatacenterAvailability() && !nodeDc.equals(localDc)) { + if (DatacenterAvailability.ALL != context.config.getDatacenterAvailability() + && !nodeDc.equals(localDc) + && context.storage instanceof IDistributedStorage) { // If DatacenterAvailability is not ALL, we should assume jmx on remote dc is not reachable. return Pair.of(node, getRemoteNodeMetrics(node, nodeDc)); } else { try { JmxProxy nodeProxy = - context.jmxConnectionFactory.connect( - Node.builder().withClusterName(clusterName).withHostname(node).build(), - context.config.getJmxConnectionTimeoutInSeconds()); + context.jmxConnectionFactory.connect( + Node.builder().withClusterName(clusterName).withHostname(node).build(), + context.config.getJmxConnectionTimeoutInSeconds()); - NodeMetrics metrics = NodeMetrics.builder() + NodeMetrics metrics = + NodeMetrics.builder() .withNode(node) .withDatacenter(nodeDc) .withCluster(nodeProxy.getClusterName()) @@ -610,7 +613,10 @@ Callable>> getNodeMetrics(String node, String return Pair.of(node, Optional.of(metrics)); } catch (RuntimeException | ReaperException e) { - LOG.debug("failed to query metrics for host {}, trying to get metrics from storage...", node, e); + LOG.debug( + "failed to query metrics for host {}, trying to get metrics from storage...", + node, + e); return Pair.of(node, getRemoteNodeMetrics(node, nodeDc)); } } diff --git a/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperAuthIT.java b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperAuthIT.java deleted file mode 100644 index b8b9c23b9..000000000 --- a/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperAuthIT.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.cassandrareaper.acceptance; - -import io.cassandrareaper.AppContext; -import io.cassandrareaper.acceptance.ReaperTestJettyRunner.ReaperJettyTestSupport; - -import cucumber.api.CucumberOptions; -import cucumber.api.junit.Cucumber; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@RunWith(Cucumber.class) -@CucumberOptions(features = "classpath:io.cassandrareaper.acceptance/access_control.feature") -public final class ReaperAuthIT { - - private static final Logger LOG = LoggerFactory.getLogger(ReaperAuthIT.class); - private static ReaperJettyTestSupport runnerInstance; - private static final String MEMORY_CONFIG_FILE = - "cassandra-reaper-at-access-control-enabled.yaml"; - - private ReaperAuthIT() {} - - @BeforeClass - public static void setUp() throws Exception { - LOG.info( - "setting up testing Reaper runner with {} seed hosts defined and memory storage", - TestContext.TEST_CLUSTER_SEED_HOSTS.size()); - - AppContext context = new AppContext(); - ReaperTestJettyRunner runner = new ReaperTestJettyRunner(); - runnerInstance = runner.setup(context, MEMORY_CONFIG_FILE); - BasicSteps.addReaperRunner(runner); - } - - @AfterClass - public static void tearDown() { - LOG.info("Stopping reaper service..."); - runnerInstance.after(); - } - -} diff --git a/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperCassandraIT.java b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperCassandraIT.java index 78638e7e8..1cf57e5fb 100644 --- a/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperCassandraIT.java +++ b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperCassandraIT.java @@ -39,9 +39,10 @@ @RunWith(Cucumber.class) @CucumberOptions( - features = "classpath:io.cassandrareaper.acceptance/integration_reaper_functionality.feature" + features = "classpath:io.cassandrareaper.acceptance/integration_reaper_functionality.feature", + plugin = {"pretty"} ) -public final class ReaperCassandraIT { +public class ReaperCassandraIT { private static final Logger LOG = LoggerFactory.getLogger(ReaperCassandraIT.class); private static final List RUNNER_INSTANCES = new CopyOnWriteArrayList<>(); @@ -49,7 +50,7 @@ public final class ReaperCassandraIT { private static final Random RAND = new Random(System.nanoTime()); private static Thread GRIM_REAPER; - private ReaperCassandraIT() {} + protected ReaperCassandraIT() {} @BeforeClass public static void setUp() throws Exception { diff --git a/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperCassandraIncrementalIT.java b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperCassandraIncrementalIT.java new file mode 100644 index 000000000..67fbd7351 --- /dev/null +++ b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperCassandraIncrementalIT.java @@ -0,0 +1,26 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.cassandrareaper.acceptance; + +import cucumber.api.CucumberOptions; +import cucumber.api.junit.Cucumber; +import org.junit.runner.RunWith; + +@RunWith(Cucumber.class) +@CucumberOptions( + features = "classpath:io.cassandrareaper.acceptance/integration_reaper_functionality.feature", + tags = {"@incremental"} + ) +public final class ReaperCassandraIncrementalIT extends ReaperCassandraIT {} diff --git a/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperCassandraNoIncrementalIT.java b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperCassandraNoIncrementalIT.java new file mode 100644 index 000000000..87cb18558 --- /dev/null +++ b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperCassandraNoIncrementalIT.java @@ -0,0 +1,26 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.cassandrareaper.acceptance; + +import cucumber.api.CucumberOptions; +import cucumber.api.junit.Cucumber; +import org.junit.runner.RunWith; + +@RunWith(Cucumber.class) +@CucumberOptions( + features = "classpath:io.cassandrareaper.acceptance/integration_reaper_functionality.feature", + tags = {"~@incremental"} + ) +public final class ReaperCassandraNoIncrementalIT extends ReaperCassandraIT {} diff --git a/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperH2IT.java b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperH2IT.java index d1539d914..8e5739372 100644 --- a/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperH2IT.java +++ b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperH2IT.java @@ -29,15 +29,17 @@ @RunWith(Cucumber.class) @CucumberOptions( - features = "classpath:io.cassandrareaper.acceptance/integration_reaper_functionality.feature" + features = "classpath:io.cassandrareaper.acceptance/integration_reaper_functionality.feature", + plugin = {"pretty"} ) -public final class ReaperH2IT { +public class ReaperH2IT { private static final Logger LOG = LoggerFactory.getLogger(ReaperH2IT.class); private static ReaperJettyTestSupport runnerInstance; private static final String H2_CONFIG_FILE = "cassandra-reaper-h2-at.yaml"; - private ReaperH2IT() {} + + protected ReaperH2IT() {} @BeforeClass public static void setUp() throws Exception { diff --git a/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperH2NoIncrementalIT.java b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperH2NoIncrementalIT.java new file mode 100644 index 000000000..e21516634 --- /dev/null +++ b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperH2NoIncrementalIT.java @@ -0,0 +1,28 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.cassandrareaper.acceptance; + +import cucumber.api.CucumberOptions; +import cucumber.api.junit.Cucumber; +import org.junit.runner.RunWith; + + + +@RunWith(Cucumber.class) +@CucumberOptions( + features = "classpath:io.cassandrareaper.acceptance/integration_reaper_functionality.feature", + tags = {"~@incremental"} + ) +public final class ReaperH2NoIncrementalIT extends ReaperH2IT {} diff --git a/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperIT.java b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperIT.java index b81fd3e56..c48a2bab1 100644 --- a/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperIT.java +++ b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperIT.java @@ -27,15 +27,16 @@ @RunWith(Cucumber.class) @CucumberOptions( - features = "classpath:io.cassandrareaper.acceptance/integration_reaper_functionality.feature" + features = "classpath:io.cassandrareaper.acceptance/integration_reaper_functionality.feature", + plugin = {"pretty"} ) -public final class ReaperIT { +public class ReaperIT { private static final Logger LOG = LoggerFactory.getLogger(ReaperIT.class); private static ReaperJettyTestSupport runnerInstance; private static final String MEMORY_CONFIG_FILE = "cassandra-reaper-at.yaml"; - private ReaperIT() {} + protected ReaperIT() {} @BeforeClass public static void setUp() throws Exception { diff --git a/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperNoIncrementalIT.java b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperNoIncrementalIT.java new file mode 100644 index 000000000..28ff0eb85 --- /dev/null +++ b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperNoIncrementalIT.java @@ -0,0 +1,26 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.cassandrareaper.acceptance; + +import cucumber.api.CucumberOptions; +import cucumber.api.junit.Cucumber; +import org.junit.runner.RunWith; + +@RunWith(Cucumber.class) +@CucumberOptions( + features = "classpath:io.cassandrareaper.acceptance/integration_reaper_functionality.feature", + tags = {"~@incremental"} + ) +public final class ReaperNoIncrementalIT extends ReaperIT {} diff --git a/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperPostgresIT.java b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperPostgresIT.java index 1d6453c25..be6b748ee 100644 --- a/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperPostgresIT.java +++ b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperPostgresIT.java @@ -27,15 +27,17 @@ @RunWith(Cucumber.class) @CucumberOptions( - features = "classpath:io.cassandrareaper.acceptance/integration_reaper_functionality.feature" + features = "classpath:io.cassandrareaper.acceptance/integration_reaper_functionality.feature", + plugin = {"pretty"} ) -public final class ReaperPostgresIT { +public class ReaperPostgresIT { private static final Logger LOG = LoggerFactory.getLogger(ReaperPostgresIT.class); private static ReaperJettyTestSupport runnerInstance; private static final String POSTGRES_CONFIG_FILE = "cassandra-reaper-postgres-at.yaml"; - private ReaperPostgresIT() {} + + protected ReaperPostgresIT() {} @BeforeClass public static void setUp() throws Exception { diff --git a/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperPostgresNoIncrementalIT.java b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperPostgresNoIncrementalIT.java new file mode 100644 index 000000000..935fadc50 --- /dev/null +++ b/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperPostgresNoIncrementalIT.java @@ -0,0 +1,26 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.cassandrareaper.acceptance; + +import cucumber.api.CucumberOptions; +import cucumber.api.junit.Cucumber; +import org.junit.runner.RunWith; + +@RunWith(Cucumber.class) +@CucumberOptions( + features = "classpath:io.cassandrareaper.acceptance/integration_reaper_functionality.feature", + tags = {"~@incremental"} + ) +public final class ReaperPostgresNoIncrementalIT extends ReaperPostgresIT {} diff --git a/src/server/src/test/java/io/cassandrareaper/service/SegmentRunnerTest.java b/src/server/src/test/java/io/cassandrareaper/service/SegmentRunnerTest.java index b9adae222..6c871e9eb 100644 --- a/src/server/src/test/java/io/cassandrareaper/service/SegmentRunnerTest.java +++ b/src/server/src/test/java/io/cassandrareaper/service/SegmentRunnerTest.java @@ -26,6 +26,8 @@ import io.cassandrareaper.jmx.JmxConnectionFactory; import io.cassandrareaper.jmx.JmxProxy; import io.cassandrareaper.jmx.RepairStatusHandler; +import io.cassandrareaper.storage.CassandraStorage; +import io.cassandrareaper.storage.IDistributedStorage; import io.cassandrareaper.storage.IStorage; import io.cassandrareaper.storage.MemoryStorage; @@ -551,7 +553,9 @@ public void getTablesToRepairRemoveAllFromListFailingTest() throws ReaperExcepti @Test public void getNodeMetricsInLocalDCAvailabilityForRemoteDCNodeTest() throws Exception { final AppContext context = new AppContext(); - context.storage = new MemoryStorage(); + context.storage = Mockito.mock(CassandraStorage.class); + when(((IDistributedStorage) context.storage).getNodeMetrics(any(), any())) + .thenReturn(Optional.absent()); JmxConnectionFactory jmxConnectionFactory = mock(JmxConnectionFactory.class); when(jmxConnectionFactory.connect(any(), anyInt())).thenReturn(mock(JmxProxy.class)); context.jmxConnectionFactory = jmxConnectionFactory; @@ -569,7 +573,7 @@ public void getNodeMetricsInLocalDCAvailabilityForRemoteDCNodeTest() throws Exce @Test public void getNodeMetricsInLocalDCAvailabilityForLocalDCNodeTest() throws Exception { final AppContext context = new AppContext(); - context.storage = new MemoryStorage(); + context.storage = Mockito.mock(CassandraStorage.class); JmxProxy proxy = mock(JmxProxy.class); when(proxy.getClusterName()).thenReturn("test"); diff --git a/src/server/src/test/resources/cassandra-reaper-at.yaml b/src/server/src/test/resources/cassandra-reaper-at.yaml index ae8707667..4c32d0edd 100644 --- a/src/server/src/test/resources/cassandra-reaper-at.yaml +++ b/src/server/src/test/resources/cassandra-reaper-at.yaml @@ -10,6 +10,7 @@ storageType: memory incrementalRepair: false enableDynamicSeedList: false jmxConnectionTimeoutInSeconds: 300 +datacenterAvailability: LOCAL logging: level: DEBUG diff --git a/src/server/src/test/resources/cassandra-reaper-cassandra-at.yaml b/src/server/src/test/resources/cassandra-reaper-cassandra-at.yaml index 0336bb328..b1e719705 100644 --- a/src/server/src/test/resources/cassandra-reaper-cassandra-at.yaml +++ b/src/server/src/test/resources/cassandra-reaper-cassandra-at.yaml @@ -10,7 +10,7 @@ storageType: cassandra incrementalRepair: false jmxConnectionTimeoutInSeconds: 300 activateQueryLogger: true -datacenterAvailability: EACH +datacenterAvailability: LOCAL logging: level: WARN diff --git a/src/server/src/test/resources/cassandra-reaper-h2-at.yaml b/src/server/src/test/resources/cassandra-reaper-h2-at.yaml index cfc1cbed4..a603e1caf 100644 --- a/src/server/src/test/resources/cassandra-reaper-h2-at.yaml +++ b/src/server/src/test/resources/cassandra-reaper-h2-at.yaml @@ -9,6 +9,7 @@ hangingRepairTimeoutMins: 1 storageType: database incrementalRepair: false jmxConnectionTimeoutInSeconds: 300 +datacenterAvailability: LOCAL logging: level: DEBUG diff --git a/src/server/src/test/resources/cassandra-reaper-postgres-at.yaml b/src/server/src/test/resources/cassandra-reaper-postgres-at.yaml index 7a6b7e477..c85989976 100644 --- a/src/server/src/test/resources/cassandra-reaper-postgres-at.yaml +++ b/src/server/src/test/resources/cassandra-reaper-postgres-at.yaml @@ -9,6 +9,7 @@ hangingRepairTimeoutMins: 1 storageType: postgres incrementalRepair: false jmxConnectionTimeoutInSeconds: 300 +datacenterAvailability: LOCAL logging: level: DEBUG diff --git a/src/server/src/test/resources/io.cassandrareaper.acceptance/integration_reaper_functionality.feature b/src/server/src/test/resources/io.cassandrareaper.acceptance/integration_reaper_functionality.feature index 0475b729b..d208b0791 100644 --- a/src/server/src/test/resources/io.cassandrareaper.acceptance/integration_reaper_functionality.feature +++ b/src/server/src/test/resources/io.cassandrareaper.acceptance/integration_reaper_functionality.feature @@ -1,11 +1,11 @@ Feature: Using Reaper to launch repairs and schedule them ## TODO: clean-up and split the scenarios to be more like Given -> When -> Then [-> But] - Background: Given cluster seed host "127.0.0.1@test" points to cluster with name "test" And ccm cluster "test" has keyspace "booya" with tables "booya1, booya2" + @full Scenario: Registering a cluster Given that we are going to use "127.0.0.1@test" as cluster seed host And reaper has no cluster in storage @@ -14,7 +14,7 @@ Feature: Using Reaper to launch repairs and schedule them When the last added cluster is deleted Then reaper has no longer the last added cluster in storage - + @full Scenario: Create a cluster and a scheduled repair run and delete them Given that we are going to use "127.0.0.1@test" as cluster seed host And reaper has no cluster in storage @@ -28,6 +28,7 @@ Feature: Using Reaper to launch repairs and schedule them And the last added cluster is deleted Then reaper has no longer the last added cluster in storage + @full Scenario: Create a cluster and a scheduled repair run with repair run history and delete them Given that we are going to use "127.0.0.1@test" as cluster seed host And reaper has no cluster in storage @@ -48,6 +49,7 @@ Feature: Using Reaper to launch repairs and schedule them And the last added cluster is deleted Then reaper has no longer the last added cluster in storage + @full Scenario: Create a cluster and a repair run and delete them Given that we are going to use "127.0.0.1@test" as cluster seed host And reaper has no cluster in storage @@ -65,6 +67,7 @@ Feature: Using Reaper to launch repairs and schedule them And the last added cluster is deleted Then reaper has no longer the last added cluster in storage + @incremental Scenario: Create a cluster and an incremental repair run and delete them Given that we are going to use "127.0.0.1@test" as cluster seed host And reaper has no cluster in storage @@ -79,7 +82,8 @@ Feature: Using Reaper to launch repairs and schedule them When the last added repair is stopped And the last added repair run is deleted And the last added cluster is deleted - + + @incremental Scenario: Create a cluster, create a cluster wide snapshot and delete it Given that we are going to use "127.0.0.1" as cluster seed host And reaper has no cluster in storage @@ -92,7 +96,8 @@ Feature: Using Reaper to launch repairs and schedule them Then there is 0 snapshot returned when listing snapshots When the last added cluster is deleted Then reaper has no longer the last added cluster in storage - + + @incremental Scenario: Create a cluster, create a snapshot on a single host and delete it Given that we are going to use "127.0.0.1" as cluster seed host And reaper has no cluster in storage