orpiske commented on code in PR #9672:
URL: https://github.com/apache/camel/pull/9672#discussion_r1151490014
##########
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:
Just a minor suggestion ... maybe use the comment in the `assertEquals` so
that:
` assertEquals(2, results.size(), "two records with id=1 and id=2 are
expected to be returned");`
That way we don't have to dig into the code to read the expectations and the
errors on CI are easier to read.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]