Hey Nicolas, I think you are looking at something like the (new) acceptance test api that runs from outside of osgi: https://github.com/ops4j/org.ops4j.pax.exam2/blob/master/drivers/pax-exam-acceptance/src/test/java/org/ops4j/pax/exam/acceptance/AcceptanceTestApiTest.java
This is currently in active development and is lacking some features like smooth access to OSGi Services from the outside. Currently, only the rest client is available (using RestAssured), but I a new one making internal services available to the test automatically is already on my local branch. In any way, we also could think of making out-of-container setup code available in regular "@RunWith(PaxExam.class)" tests. Did you try booting Neo4j inside the @Configuration method? that is executed before the OSGi container is launched, so it does run in plain java. Another try: did you try using a Junit Rule with "@RunWith()"? this should work, too. Toni *www.rebaze.de <http://www.rebaze.de/> | www.rebaze.com <http://www.rebaze.com/> | @rebazeio <https://twitter.com/rebazeio>* On Fri, Aug 4, 2017 at 11:59 AM, Nicolas Brasey <[email protected]> wrote: > Hi, > > Context: I want to use pax-exam for our business integration tests that > needs to have a database (neo4j) that is not OSGi friendly running before > the test are executed. we use maven. > > Also, neo4j provides a embedded server that works extremely well outside > of an OSGi container, but I can't find a way to start this embedded server > with pax-exam outside of the container before the pax-exam machinery is > starting. > > The idea is to start the database in the non-OSGi context when the > pax-runner is starting, something like the beforeClass, and stop the > database after all the tests are finished ala afterClass. > > Does anyone has an idea how to do this ? > > Thanks > Nicolas > > -- > -- > ------------------ > OPS4J - http://www.ops4j.org - [email protected] > > --- > You received this message because you are subscribed to the Google Groups > "OPS4J" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- ------------------ OPS4J - http://www.ops4j.org - [email protected] --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
