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

CamelBlueprintTestSupport does not work reliably if multiple camelcontexts are loaded

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.24.3, 3.2.0
    • Fix Version/s: None
    • Component/s: camel-blueprint
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      I have two bundles, A and B. Both have a camel context defined at OSGI-INF/blueprint/something.xml. Bundle A is dependent on Bundle B. I have unit tests written for Bundle A's routes written using CamelBlueprintTestSupport. I expect that during the setUp for each test, the routes I defined in Bundle A will be started. However, intermittently, those routes do not start and the routes in Bundle B do instead.

      When trying to diagnose the issue, I was able to pinpoint the cause as this code here, which requests any currently loaded CamelContext service, but doesn't apply any sort of filter to make sure it's the same camelcontext that was created by CamelBlueprintTestSupport itself. It should be possible to fix this by adding some filter, e.g. on the camel.context.symbolicname.

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bahrymat bahrymat
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: