0 Replies Latest reply on Oct 29, 2013 7:06 AM by Natasha Rayappan

    Junit testing for JDBC component

    Natasha Rayappan Newbie

      I am new to Apache Camel and JBoss Fuse. We have managed to construct a simple route which polls DB data and applies a aggregator logic, and the result posted to a mock queue. I would like to unit test the aggregator without polling the DB using JUnit.


      I am utilizing the Dataset to send the DB data (XML format  - converted to a string) to the aggregator. But getting the following error when I run Maven install in the Fuse IDE



      Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 24.93 sec <<< FAILURE!




      Results :




      Failed tests: testCamelRoute(

      com.sample.route.CamelContextXmlTest): dataset://dbInput Received message count. Expected: <10> but was: <1>


      I cannot understand where this configuration is set and why it is not able to aggregate the single input sent.