Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2986#discussion_r216411110
--- Diff:
nifi-nar-bundles/nifi-cassandra-bundle/nifi-cassandra-processors/src/test/java/org/apache/nifi/processors/cassandra/PutCassandraQLTest.java
---
@@ -171,6 +171,98 @@ public void testProcessorHappyPathELConfig() {
testRunner.clearTransferState();
}
+ @Test
+ public void testMultipleQuery() {
+ setUpStandardTestConfig();
+ testRunner.setProperty(PutCassandraQL.STATEMENT_CACHE_SIZE, "1");
+
+ testRunner.enqueue("INSERT INTO users (user_id, first_name,
last_name, properties, bits, scaleset, largenum, scale, byteobject, ts) VALUES
?, ?, ?, ?, ?, ?, ?, ?, ?, ?",
+ new HashMap<String, String>() {
--- End diff --
Is probably best to avoid the anonymous inner class and just use a HashMap
and then call put() methods, no? It also appears to be the same values each
time, so can create just a single HashMap and then pass it each time.
---