ops4j / org.ops4j.pax.exam2

Pax Exam is a testing framework for OSGi
https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/
Apache License 2.0
84 stars 100 forks source link

Only one camel context returned per Bundle! [PAXEXAM-652] #760

Open ops4j-issues opened 10 years ago

ops4j-issues commented 10 years ago

Venkatesh Laguduva created PAXEXAM-652

The issue I am facing is about retrieving the CamelContext using the bundle context injected into the PaxExam. I have a bundle with 3 different camel contexts in 3 different blueprint xml files; Using the injected bundle context, when I try to query for the camel context available in the 2nd blueprint xml file, it returned null whereas when I try to query for the camel context available in the 1st blueprint xml file, it returned the valid camel context object. It seems that the injected bundle context knew only one camel context per bundle. To confirm that, I have excluded the 1st blueprint xml from the bundle; tried to query for the camel context from the 2nd blueprint xml, it returned the valid camel context object; again excluded the 2nd blueprint xml, tried to query for the camel context from the 3rd blueprint xml, it returned the valid camel context object. It seems to me a bug


Affects: 3.4.0 Votes: 0, Watches: 2

ops4j-issues commented 10 years ago

Harald Wellmann commented

I can't really follow... Pax Exam does not know anything about Camel or Blueprint.

Note that the BundleContext injected into the test class belongs to the test probe bundle, not to any of the bundles provisioned by your test configuration.

If that does not help to explain what you're seeing, please provide a self-contained test case.