[PAX-EXAM] Sporadic ServiceLookupException in JUnitProbeInvokerFactory.createProbeInvoker

53 views
Skip to first unread message

Matteo Rulli

unread,
Apr 25, 2020, 2:34:51 AM4/25/20
to OPS4J
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

Jean-Baptiste Onofré

unread,
Apr 26, 2020, 1:06:16 AM4/26/20
to OPS4J
Hi, 

yes, it makes sense. Let me know if you want to create the PR else I will do it.

Thanks,
Regards
JB

--
--
------------------
OPS4J - http://www.ops4j.org - op...@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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/726f50f1-2534-45b6-8fef-3dbb4f731a10%40googlegroups.com.

Matteo Rulli

unread,
Apr 26, 2020, 6:26:20 AM4/26/20
to op...@googlegroups.com
Hello,


I hope it is ok.

Best,
Matteo

You received this message because you are subscribed to a topic in the Google Groups "OPS4J" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ops4j/T8xDJLfYJ0E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ops4j+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/CAB8EV3QW0kv%3DLu5FK3rb9pAJgdRbmp6WyMvuyriCNm%2Bvt74FYw%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages