Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2866#discussion_r97310954
  
    --- Diff: 
flink-streaming-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/CassandraConnectorITCase.java
 ---
    @@ -371,70 +351,77 @@ public void testCassandraCommitter() throws Exception 
{
     
        @Test
        public void testCassandraTupleAtLeastOnceSink() throws Exception {
    -           StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironment();
    -           env.setParallelism(1);
    +           CassandraTupleSink<Tuple3<String, Integer, Integer>> sink = new 
CassandraTupleSink<>(injectTableName(INSERT_DATA_QUERY), builder);
    +
    +           sink.open(new Configuration());
     
    -           DataStream<Tuple3<String, Integer, Integer>> source = 
env.fromCollection(collection);
    -           source.addSink(new CassandraTupleSink<Tuple3<String, Integer, 
Integer>>(INSERT_DATA_QUERY, builder));
    +           for (Tuple3<String, Integer, Integer> value : collection) {
    +                   sink.send(value);
    +           }
     
    -           env.execute();
    +           sink.close();
     
    -           ResultSet rs = session.execute(SELECT_DATA_QUERY);
    +           synchronized (sink.updatesPending) {
    --- End diff --
    
    Is this needed when `close()` already waits for pending requests?


---
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.
---

Reply via email to