Hi,

take a look at how it's used in Karaf itself, maybe you're doing something
slightly different. :)

http://svn.apache.org/viewvc/karaf/trunk/tooling/exam/regression/src/test/java/org/apache/karaf/tooling/exam/regression/KarafWithBundleTest.java?view=markup

regards, Achim


2013/5/17 William la Forge <[email protected]>

> I switched to karaf 2.3.1, but there was no change
>
>
> On Fri, May 17, 2013 at 5:18 PM, William la Forge <[email protected]>wrote:
>
>> I have an integration test that works half the time when I set the
>> logging level to DEBUG. So I figured I need to use @Before, but the method
>> does not get called.
>>
>> org.apache.karaf 3.0.0.RC1
>> org.apache.karaf.tooling.exam 3.0.0.RC1
>> org.ops4j.pax.exam 2.6.0
>>
>> pom:
>> https://github.com/laforge49/JActor2/blob/master/jactor-ktest/pom.xml
>> test source:
>> https://github.com/laforge49/JActor2/blob/master/jactor-ktest/src/test/java/org/apache/karaf/VersionAsInProjectKarafTest.java
>>
>> I modeled my test on
>> http://karaf.apache.org/manual/latest-2.3.x/developers-guide/writing-tests.html
>>
>> I used mavenBundle in config:
>>
>>     @Configuration
>>     public Option[] config() {
>>         return new Option[]{karafDistributionConfiguration().frameworkUrl(
>>
>> maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("zip").versionAsInProject())
>>                 .karafVersion("2.2.4").name("Apache Karaf"),
>>
>>                 logLevel(LogLevelOption.LogLevel.INFO),
>>
>>                 mavenBundle("org.agilewiki.jactor", "jactor-api",
>> "0.0.1-SNAPSHOT"),
>>                 mavenBundle("org.agilewiki.jactor", "jactor-impl",
>> "0.0.1-SNAPSHOT"),
>>                 mavenBundle("org.agilewiki.jactor", "jactor-util",
>> "0.0.1-SNAPSHOT"),
>>                 mavenBundle("org.agilewiki.jactor", "jactor-test-iface",
>> "0.0.1-SNAPSHOT"),
>>                 mavenBundle("org.agilewiki.jactor",
>> "jactor-test-service", "0.0.1-SNAPSHOT")
>>
>>         };
>>     }
>>
>> My before method is not called:
>>
>>     @Before
>>     public void setup() throws Exception {
>>         Thread.sleep(10000);
>>     }
>>
>> The result I get without DEBUG and half the time with DEBUG set is:
>>
>>
>> test:org.apache.karaf.VersionAsInProjectKarafTest.test:KarafTestContainer{mvn:
>>
>> org.apache.karaf\/apache-karaf\/3.0.0.RC1\/zip}(org.apache.karaf.VersionAsInProj
>> ectKarafTest): org.agilewiki.jactor.testIface.Hello not found by
>> PAXEXAM-PROBE-e
>> 10f1edd-464b-4800-a783-7dcfd54a2a0d [93]
>>
>> I'm running on Windows 7.
>>
>> Any help would be appreciated. Thanks!
>>
>> Bill
>>
>>
>>
>


-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
Commiter & Project Lead
blog <http://notizblog.nierbeck.de/>

Reply via email to