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

camel-jdbc: replacing deprecated code leads to test failures

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5.0
    • Fix Version/s: 3.5.0
    • Component/s: camel-jdbc
    • Labels:
      None
    • Estimated Complexity:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: