You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "bahrymat (Jira)" <ji...@apache.org> on 2020/05/01 22:01:00 UTC
[jira] [Updated] (CAMEL-14997) CamelBlueprintTestSupport does not
work reliably if multiple camelcontexts are loaded
[ https://issues.apache.org/jira/browse/CAMEL-14997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
bahrymat updated CAMEL-14997:
-----------------------------
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|https://github.com/apache/camel-karaf/blob/master/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java#L504], 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.
was:
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|[https://github.com/apache/camel-karaf/blob/master/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java#L504]], 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.
> CamelBlueprintTestSupport does not work reliably if multiple camelcontexts are loaded
> -------------------------------------------------------------------------------------
>
> Key: CAMEL-14997
> URL: https://issues.apache.org/jira/browse/CAMEL-14997
> Project: Camel
> Issue Type: Bug
> Components: camel-blueprint
> Affects Versions: 2.24.3, 3.2.0
> Reporter: bahrymat
> Assignee: Grzegorz Grzybek
> Priority: Minor
>
> 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|https://github.com/apache/camel-karaf/blob/master/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java#L504], 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.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)