Otavio Rodolfo Piske created CAMEL-15453:
--------------------------------------------

             Summary: camel-jdbc: replacing deprecated code leads to test 
failures
                 Key: CAMEL-15453
                 URL: https://issues.apache.org/jira/browse/CAMEL-15453
             Project: Camel
          Issue Type: Bug
          Components: camel-jdbc
    Affects Versions: 3.5.0
            Reporter: Otavio Rodolfo Piske


In camel-jdbc modifying the code to replace calls to getOut with getMessage, as 
instructed by the javadoc, leads to a test failure in 
{{JdbcOptionsTest.testInsertCommit}}.

 

The code fails because [this assertion 
fails|https://github.com/apache/camel/blob/4ea9e6c357371682b855d2d79655b41120331b7a/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcOptionsTest.java#L64].
 In other words, the call to 
{{mock.getExchanges().get(0).getIn().getBody(String.class);}}  does return a 
body when applying these changes.

 

I am attaching a patch that can be used to reproduce the issue. To apply the 
patch, from the camel-jdbc component directory, use {{patch -p3 < 
jdbc-deprecations.patch}}.

 

*Note 1*: Removing the assertion doesn't seem to affect the results of the test

*Note 2*: JdbcOptionsTest is not even modified by the patch.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to