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" 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