On Tuesday, 30 March 2021 18:51:36 CEST Thomas Dalton wrote: > Christian,
Hi Tom, > Were you able to figure out a solution to starting/stopping docker > containers while using the PaxExam runner? I want to be able to use > TestContainers (https://www.testcontainers.org/) to spin up an external DB > and verify services can talk to the DB, There are modules in Apache Sling which start a Docker container during testing with Pax Exam: ClamAV: https://github.com/apache/sling-org-apache-sling-commons-clam/blob/master/src/ test/java/org/apache/sling/commons/clam/it/tests/ClamTestSupport.java MongoDB: https://github.com/apache/sling-org-apache-sling-karaf-integration-tests/blob/ master/src/test/java/org/apache/sling/karaf/tests/bootstrap/ SlingQuickstartOakMongoIT.java HTH, O. > Thanks, > Tom > > On Saturday, May 5, 2018 at 2:04:43 AM UTC-6 cschne...@gmail.com wrote: > > One case is to start and stop docker containers. > > Another case is to start additional OSGi containers using PaxExamRuntime. > > createContainer. > > > > I have to use forked mode. So it makes some difference. > > If there is no predefined way then I will create my own class extending > > PaxExam that calls my hooks. > > > > Christian > > > > 2018-05-04 19:42 GMT+02:00 'Christoph Läubrich' via OPS4J < > > > > op...@googlegroups.com>: > >> What exactly do you want to archive? > >> > >> e.g. the configure method is run "outside" the container, or you can > >> simply have an static insitilizer and check there if an active OSGi env > >> is > >> avaiable (OSGi Phase) or not (configuration phase)... > >> > >> Beside that, if you are not using the forked mode all code already runns > >> in the same jvm process... > > > >> Am 04.05.2018 um 17:22 schrieb Christian Schneider: > > I would like to have code executed outside of the OSGi container in the > > > >>> process where junit runs. > >>> > >>> This used to work with @BeforeClass in older versions of pax exam. Now > >>> these methods are also run in OSGi. > >>> > >>> Is there some way to run my code outside in a generic way? > >>> > >>> What I did until now is to extend pax exam an override the run method. > >>> Is there maybe a built in way that avoids this? > >>> > >>> Christian > >>> > >>> > >>> Computer Scientist > >>> http://www.adobe.com > >>> > >>> > >>> --- > >>> 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 ops4j+unsubscr...@googlegroups.com <mailto: > >>> ops4j+unsubscr...@googlegroups.com>. > >>> > >>> > >>> For more options, visit https://groups.google.com/d/optout. > >> > >> --- 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 ops4j+unsubscr...@googlegroups.com. > >> > >> > >> For more options, visit https://groups.google.com/d/optout. > > > > Computer Scientist > > http://www.adobe.com -- Oliver Lietz | Wintgensweg 29 | 45481 Mülheim an der Ruhr fon: +49 208 41191263 | fax: +49 208 41191264 email: i...@oliverlietz.de | web: oliverlietz.de -- -- ------------------ OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- 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 ops4j+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/2325381.RSjJl314KY%40madness.front.ruhr.