Hi Toni,

actually I'm using the native container.

<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-container-native</artifactId>
<version>2.5.0</version>
<scope>test</scope>
</dependency>

My test looks something along the lines of:

    @Configuration
    public Option[] config() {
        return options(
                /* Dependencies */
mavenBundle("com.google.guava", "guava", "13.0").startLevel(10), mavenBundle("org.apache.commons", "com.springsource.org.apache.commons.lang", "2.6.0"),
                /* ... My bundles ...*/,
                ...,
                /* Test bundles */
                junitBundles());
    }

    @Test
    public void getBundle() throws BundleException {
        LOG.warn("Hello OSGi!");
MyClass.someMethod(); // If a dependent bundle to my bundle is missing I get a ClassNotFoundException here. // although I would expect Pax-Exam to tell me that something failed to resolve.
    }

Any ideas?

best regards, Peter

On 08/28/2012 08:54 AM, Toni Menzel wrote:

Quick question: i am assuming you are running the paxrunner container? This is a blackbox to Exam. Yes a sanity run would help here. On the other hand, that container is on the way out in version 3.0. Or do you have this behaviour with the other containers? There things are in exam control and should be handled in a better way already.

Toni

Please note: this message sent from a Mobile device.

On Aug 28, 2012 8:43 AM, "peter.gardfjall.work" <peter.gardfjall.w...@gmail.com <mailto:peter.gardfjall.w...@gmail.com>> wrote:

    Hi,

    I just noticed that Pax-Exam (2.5.0) doesn't fail/warn me when a
    test-provisioned bundle fails to start/resolve (missing constraint).
    In my case, I end up with a ClassNotFoundException when my test
    attempts to use a class from the bundle.

    I would have expected Pax-Exam to fail when a provisioned bundle
    fails to resolve.
    That would shorten the troubleshooting time quite drastically.

    I assume there is a good reason why Pax-Exam doesn't help me with
    this.

    Considering the lack of such help, is there a conventional way of
    making sure that all your test bundles are up and running as a
    pre-test sanity check?
    How do you Pax-Exam folks out there manage this

    best regards, Peter

    _______________________________________________
    general mailing list
    general@lists.ops4j.org <mailto:general@lists.ops4j.org>
    http://lists.ops4j.org/mailman/listinfo/general



_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to