mchro commented on a change in pull request #10339: [FLINK-14976][cassandra] 
Release semaphore on all Throwable's in send()
URL: https://github.com/apache/flink/pull/10339#discussion_r351337791
 
 

 ##########
 File path: 
flink-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/CassandraSinkBaseTest.java
 ##########
 @@ -420,4 +446,15 @@ void 
enqueueCompletableFuture(CompletableFuture<ResultSet> completableFuture) {
                        throw new InvalidQueryException("For test purposes");
                }
        }
+
+       private static class SendErrorTestCassandraSink extends 
TestCassandraSink {
+               SendErrorTestCassandraSink(CassandraSinkBaseConfig config) {
+                       super(config, new NoOpCassandraFailureHandler());
+               }
+
+               @Override
+               public ListenableFuture<ResultSet> send(String value) {
+                       throw new Error("For test purposes");
 
 Review comment:
   Unfortunately I don't think we can do this, since we would then have to add 
`Throwable` to the signature of `send()` in the base class.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to