-
1. Re: Problems with initializing a pax-exam-based JUnit test
prossman Aug 26, 2010 1:09 PM (in response to prossman)... forgot to attach the surefire output.
In the meanwhile, I reduced the configuration method to...
@Configuration
public static Option[] configuration() throws Exception {
return combine(
// Default karaf environment
Helper.getDefaultOptions(),
// Test on both equinox and felix
equinox(), felix());
}
... but to no avail; I still get the same error message.
I should mention that the files are where they should be.
I also checked the Felix Karaf mailing list archive. There is one other entry regarding Helper.getDefaultOptions(), but it seems to be unrelated.
-
2. Re: Problems with initializing a pax-exam-based JUnit test
prossman Aug 30, 2010 10:41 AM (in response to prossman)FYI: the Fuse documentation about using Pax Exam is lacking an important part.
If you're using Helper.getDefaultOptions(), the method will look for a file META-INF/maven/dependencies.properties on the classpath. If it finds this file inside a JAR file, the code will fail as described before.
If you include...
... in the POM, the file will be generated in the target/classes folder. I found out about this after examining the Apache Felix Karaf integration tests.
-
3. Re: Problems with initializing a pax-exam-based JUnit test
ffang Aug 30, 2010 10:21 PM (in response to prossman)Hi,
Thanks so much for this feedback.
Freeman
-
4. Re: Problems with initializing a pax-exam-based JUnit test
prossman Sep 27, 2010 5:36 AM (in response to ffang)Hi again,
Back in the day, I did some follow-up on this in order to get the tests up and running. However, I didn't manage, and as it seemed Pax-Exam related, I posted to their mailing list (http://permalink.gmane.org/gmane.comp.java.ops4j.general/10703) - but didn't get an answer so far.
As testing is getting into focus again, I was wondering if any of you Fuse guys has an idea of how to resolve the issue? (Please find attached the unit test in question)
Thanks,
Ciao, Philipp
-
5. Re: Problems with initializing a pax-exam-based JUnit test
davsclaus Sep 27, 2010 8:27 AM (in response to prossman)Have you tried looking into the source code of Karaf? They must use that by themselves to test karaf.
At Apache Camel we got some osgi tests here
https://svn.apache.org/repos/asf/camel/trunk/tests/camel-itest-osgi/
-
6. Re: Problems with initializing a pax-exam-based JUnit test
prossman Sep 28, 2010 4:18 AM (in response to davsclaus)Hi,
thanks for the hint. I've been looking at some tests that I found in the Felix Karaf sources, but haven't been investigating the Camel tests yet.
In the meanwhile, I found out that adding...
CoreOptions.systemProperty("org.osgi.framework.executionenvironment").value("J2SE-1.5,J2SE-1.4")
... solves the J2SE-1.4 issue described in the other thread.
Ciao, Philipp