>>>>> Achim Nierbeck <[email protected]>:

> totally different ;)

Right.  The behaviour was different as well:
With
    public Option[] config() {
        final MavenArtifactUrlReference karafUrl = 
maven().groupId("org.apache.karaf").artifactId("apache-karaf-minimal").type("zip").versionAsInProject();
        final MavenArtifactUrlReference karafStandrdRepo = 
maven().groupId("org.apache.karaf.features").artifactId("standard").versionAsInProject().type("xml").classifier("features");
        final MavenArtifactUrlReference ukelonnFeatureRepo = 
maven().groupId("no.priv.bang.ukelonn").artifactId("ukelonn.karaf").versionAsInProject().type("xml").classifier("features");
        return options(
            
karafDistributionConfiguration().frameworkUrl(karafUrl).unpackDirectory(new 
File("target/exam")).useDeployFolder(false).runEmbedded(true),
            configureConsole().ignoreLocalConsole().ignoreRemoteShell(),
            features(karafStandrdRepo, "pax-jdbc"),
            junitBundles(),
            features(ukelonnFeatureRepo, "ukelonn-db-derby-test", "ukelonn"));
    }

what I got from maven, was:
 Running no.priv.bang.ukelonn.tests.UkelonnServiceIntegrationTest
 SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
 SLF4J: Defaulting to no-operation (NOP) logger implementation
 SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further 
details.
 Exception in thread "KarafEmbeddedRunner" java.lang.RuntimeException: No Karaf 
main found
         at 
org.ops4j.pax.exam.karaf.container.internal.runner.KarafEmbeddedRunner$1.run(KarafEmbeddedRunner.java:85)
 Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 182.318 sec 
<<< FAILURE! - in no.priv.bang.ukelonn.tests.UkelonnServiceIntegrationTest
 no.priv.bang.ukelonn.tests.UkelonnServiceIntegrationTest  Time elapsed: 
182.015 sec  <<< ERROR!
 java.lang.RuntimeException: Cannot get the remote bundle context
 Caused by: java.rmi.NotBoundException: bfa21964-9d13-4a55-b633-f0bc4368077a
 
 no.priv.bang.ukelonn.tests.UkelonnServiceIntegrationTest  Time elapsed: 
182.318 sec  <<< ERROR!
 java.lang.RuntimeException: Container never came up
         at 
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
         at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
         at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
         at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)

so there is probably something missing from my setup.

For now, I will go back to the surefire config (it saves me the job of
manually killing the leftover java processes, and gets further before
it fails).

> if you are brave, you may want to take a look at the pax-web integration
> tests with Karaf. [1]
> Maybe there are enough hints for you to find out where exactly is your
> mismatch :)

> [1] - 
> https://github.com/ops4j/org.ops4j.pax.web/tree/master/pax-web-itest/pax-web-itest-karaf/src/test/java/org/ops4j/pax/web/itest/karaf

Thanks for the tip! I will keep looking.
And post the reason when/if I find it (or find a workaround).

Reply via email to