Hello,
We are using Pax-Exam to run integration tests based on Apache Karaf. On particularly heavy tests we experience sporadic ServiceLookupException in JUnitProbeInvokerFactory.createProbeInvoker, something like this:
org.ops4j.pax.swissbox.tracker.ServiceLookupException: gave up waiting for service org.ops4j.pax.exam.util.Injector
at org.ops4j.pax.swissbox.tracker.ServiceLookup.getService(ServiceLookup.java:199) ~[306:org.ops4j.pax.swissbox.tracker:1.8.3]
at org.ops4j.pax.swissbox.tracker.ServiceLookup.getService(ServiceLookup.java:119) ~[306:org.ops4j.pax.swissbox.tracker:1.8.3]
at org.ops4j.pax.swissbox.tracker.ServiceLookup.getService(ServiceLookup.java:72) ~[306:org.ops4j.pax.swissbox.tracker:1.8.3]
at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvokerFactory.createProbeInvoker(JUnitProbeInvokerFactory.java:35) ~[?:?]
at org.ops4j.pax.exam.raw.extender.intern.Parser.createInvoker(Parser.java:94) ~[?:?]
at org.ops4j.pax.exam.raw.extender.intern.Parser.make(Parser.java:81) ~[?:?]
at org.ops4j.pax.exam.raw.extender.intern.Parser.<init>(Parser.java:67) ~[?:?]
at org.ops4j.pax.exam.raw.extender.intern.TestBundleObserver.addingEntries(TestBundleObserver.java:69) ~[?:?]
at org.ops4j.pax.swissbox.extender.BundleWatcher$3.run(BundleWatcher.java:226) [303:org.ops4j.pax.swissbox.extender:1.8.3]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
At the time being we are solving these errors running tests twice but this is quite unsatisfactory.
I see that the createProbeInvoker use the default 10 seconds timeout to get the
Injector service. Would it be possible to apply the same approach adopted
here? I would submitted a PR but I don't have access rights to create an issue on Jira.
Thank you very much,
Matteo