Hi Andreas, I actually just found a solution that is at least a little better. I used PaxExamRuntime.createTestSystem and PaxExamRuntime.createContainer to start a second instance. This allows me to use the config options to define the instance.
Still it would be great if we somehow could make this possible in default exam. Perhaps we could have a name attribute in the @Configuration annotation so you could create one config method per system you want pax to start. Christian See: https://gist.github.com/4111108 On 11/19/2012 03:20 PM, Andreas Pieber wrote: > not really. The problem is that Pax Exam itself isn't build for a > situation like this. And since pax-exam-karaf only uses the > capabilities of exam it's not really possible to do this. > > IMHO there are only two options: > > a) use the not so great solution via the admin service > b) come up with something completely new > > Kind regards, > Andreas > > On Mon, Nov 19, 2012 at 1:06 PM, Christian Schneider > <[email protected]> wrote: >> For test with one karaf container karaf exam is already really great. >> For some cases though I would like to create more than one karaf. >> For example in cxf dosgi I would like to have two instances: >> 1) Client for service and DOSGi infrastructure >> 2) Service provider, DOSGi infrastructure, Zookeeper server >> >> My test would run inside container 1 but it would also need container 2. >> >> So what are the best practices to achieve this? >> >> I have found similar cases in Karaf Cellar. There the karaf >> admin(instance) service is used to create another karaf instance. Then >> the connect command is used to issue shell commands that configure the >> remote instance. >> While this works it is very verbose and contains a lot of sleeps to wait >> for commands to finish. >> >> What I would ideally be looking for is to have one set of pax exam >> options for each container. Is that possible? >> >> Christian >>
