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

Wrong debug log output when using MockEndpoint

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.20.0
    • camel-test
    • None
    • Unknown

    Description

      In class org.apache.camel.component.mock.MockEndPoint, there is bug in the following method:

      protected void waitForCompleteLatch(long timeout) throws InterruptedException {
          // Wait for a default 10 seconds if resultWaitTime is not set
          long waitTime = timeout == 0 ? 10000L ** : timeout;

          // now let's wait for the results
          LOG.debug("Waiting on the latch for: {} millis", timeout);
                  **    if (!latch.await(waitTime, TimeUnit.MILLISECONDS)) {
              LOG.warn("The latch did not reach 0 within the specified time");
              }
      }

      Use waitTime instead of timeout in the debug log:

      LOG.debug("Waiting on the latch for: {} millis", timeout);

      Attachments

        Activity

          People

            nfilotto Nicolas Filotto
            manlanger Manuel Langer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: