You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Marcel Reutegger <mr...@adobe.com> on 2017/04/25 08:56:49 UTC
ObservationTest with Thread.sleep()
Hi,
there is a test in oak-jcr
(org.apache.jackrabbit.oak.jcr.observation.ObservationTest) with many
Thread.sleep() calls. This means, the test mostly sleeps and slows down
the build. What's the reason for those sleeps and can we somehow remove
them?
Regards
Marcel
Re: ObservationTest with Thread.sleep()
Posted by Stefan Egli <st...@apache.org>.
Hi Marcel,
IIUC then the sleeps are used to check for expected *and* unexpected
events. The expected part could be easily replaced with a busy-check loop.
The unexpected part is a bit more tricky though, but the test could be
rewritten to be more of a white-box test where not only both ends are
tested but also the middle (observation queue) part, that would work.
So I guess yes, the sleeps could be avoided - with a bit of effort though.
Cheers,
Stefan
On 25/04/17 10:56, "Marcel Reutegger" <mr...@adobe.com> wrote:
>Hi,
>
>there is a test in oak-jcr
>(org.apache.jackrabbit.oak.jcr.observation.ObservationTest) with many
>Thread.sleep() calls. This means, the test mostly sleeps and slows down
>the build. What's the reason for those sleeps and can we somehow remove
>them?
>
>Regards
> Marcel