You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Otavio Rodolfo Piske (Jira)" <ji...@apache.org> on 2020/08/24 06:13:00 UTC

[jira] [Updated] (CAMEL-15453) camel-jdbc: replacing deprecated code leads to test failures

     [ https://issues.apache.org/jira/browse/CAMEL-15453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Otavio Rodolfo Piske updated CAMEL-15453:
-----------------------------------------
    Attachment: deprecations-trace.txt

> 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
>            Priority: Major
>         Attachments: deprecations-trace.txt, jdbc-deprecations.patch
>
>
> 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)