Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/2759#discussion_r86755620
--- Diff:
flink-streaming-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/CassandraConnectorITCase.java
---
@@ -318,6 +312,46 @@ protected void verifyResultsDataDiscardingUponRestore(
Assert.assertTrue("The following ID's were not found in the
ResultSet: " + list.toString(), list.isEmpty());
}
+ @Override
+ protected void
verifyResultsWhenScalingDown(CassandraTupleWriteAheadSink<Tuple3<String,
Integer, Integer>> sink) throws Exception {
+
+ ArrayList<Integer> list = new ArrayList<>();
+ for (int x = 1; x < 34; x++) {
+ list.add(x);
+ }
+
+ ResultSet result = session.execute(SELECT_DATA_QUERY);
+ for (Row s : result) {
+ list.remove(new Integer(s.getInt("counter")));
+ }
+ Assert.assertTrue(list.isEmpty());
+ }
+
+ @Override
+ protected void verifyResultsWhenScalingUp(
+ CassandraTupleWriteAheadSink<Tuple3<String, Integer, Integer>>
sink, int startElementCounter, int endElementCounter) {
+
+ // IMPORTANT NOTE:
+ //
+ // for cassandra we always have to start from 1 because
+ // all operators will share the same final db
+
+ ArrayList<Integer> list = new ArrayList<>();
+ for (int i = 1; i <= endElementCounter; i++) {
+ list.add(i);
+ }
+
+ ArrayList<Integer> expected = new ArrayList<>();
--- End diff --
this list does not contain the "expected" values.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---