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

    https://github.com/apache/flink/pull/3748#discussion_r115935549
  
    --- Diff: 
flink-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/CassandraConnectorITCase.java
 ---
    @@ -438,6 +462,45 @@ public void cancel() {
        }
     
        @Test
    +   public void testCassandraTableSink() throws Exception {
    +           StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironment();
    +           env.setParallelism(1);
    +
    +           DataStreamSource<Row> source = 
env.fromCollection(rowCollection);
    +           CassandraTableSink cassandraTableSink = new 
CassandraTableSink(new ClusterBuilder() {
    +                   @Override
    +                   protected Cluster buildCluster(Cluster.Builder builder) 
{
    +                           return builder.addContactPointsWithPorts(new 
InetSocketAddress(HOST, PORT)).build();
    +                   }
    +           }, INSERT_DATA_QUERY, new Properties());
    +           CassandraTableSink newCassandrTableSink = 
cassandraTableSink.configure(FIELD_NAMES, FIELD_TYPES);
    +
    +           newCassandrTableSink.emitDataStream(source);
    +
    +           env.execute();
    +           ResultSet rs = session.execute(SELECT_DATA_QUERY);
    +           Assert.assertEquals(20, rs.all().size());
    +   }
    +
    +   @Test
    +   public void testCassandraTableSinkE2E() throws Exception {
    +           StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironment();
    +           env.setParallelism(4);
    +           StreamTableEnvironment tEnv = 
StreamTableEnvironment.getTableEnvironment(env);
    --- End diff --
    
    @zentol here is the unit test that implicitly requires the scale dependency.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to