You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "sekikn (via GitHub)" <gi...@apache.org> on 2023/03/29 11:53:29 UTC

[GitHub] [camel] sekikn commented on a diff in pull request #9672: CAMEL-19216: camel-kudu - add predicate support to the scan operation

sekikn commented on code in PR #9672:
URL: https://github.com/apache/camel/pull/9672#discussion_r1151818491


##########
components/camel-kudu/src/test/java/org/apache/camel/component/kudu/KuduScanTest.java:
##########
@@ -107,6 +111,34 @@ public void scan() throws InterruptedException {
 
     }
 
+    @Test
+    public void scanWithPredicate() throws InterruptedException {
+        errorEndpoint.expectedMessageCount(0);
+        successEndpoint.expectedMessageCount(2);
+
+        // without predicate
+        Map<String, Object> headers = new HashMap<>();
+        headers.put(KuduConstants.CAMEL_KUDU_SCAN_PREDICATE, null);
+        sendBody("direct:scan", null, headers);
+        List<Map<String, Object>> results = (List<Map<String, Object>>) successEndpoint.getReceivedExchanges()
+                .get(0).getIn().getBody(List.class);
+        // two records with id=1 and id=2 are expected to be returned
+        assertEquals(2, results.size());

Review Comment:
   Thanks for the review! Will update the PR soon.



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

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org