Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15453

camel-jdbc: replacing deprecated code leads to test failures

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.5.0
    • 3.5.0
    • camel-jdbc
    • None
    • Unknown

    Description

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

       

      Attachments

        1. deprecations-trace.txt
          7 kB
          Otavio Rodolfo Piske
        2. jdbc-deprecations.patch
          15 kB
          Otavio Rodolfo Piske

        Activity

          People

            davsclaus Claus Ibsen
            orpiske Otavio Rodolfo Piske
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: