Re: [PAX-EXAM] Sporadic ServiceLookupException in JUnitProbeInvokerFactory.createProbeInvoker

2020-04-25 Thread Jean-Baptiste Onofré
Hi,

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

Thanks,
Regards
JB

On Sat, Apr 25, 2020 at 8:34 AM Matteo Rulli  wrote:

> 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.(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
>
> --
> --
> --
> 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/726f50f1-2534-45b6-8fef-3dbb4f731a10%40googlegroups.com
> 
> .
>

-- 
-- 
--
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/CAB8EV3QW0kv%3DLu5FK3rb9pAJgdRbmp6WyMvuyriCNm%2Bvt74FYw%40mail.gmail.com.


[PAX-EXAM] Sporadic ServiceLookupException in JUnitProbeInvokerFactory.createProbeInvoker

2020-04-25 Thread Matteo Rulli
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.(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

-- 
-- 
--
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/726f50f1-2534-45b6-8fef-3dbb4f731a10%40googlegroups.com.