Hi Vincent,
I think the problem there is in the initialization of CSRF component, it
seeds an instance of SecureRandom, which in turn takes the randomness
from /dev/random AFAIK, and that can be very slow on some hardware. On
my laptop the tests take 2:30 if I do not touch the mouse and keyboard
during the test run and 1 second if I do.
There is an command line option
-Djava.security.egd=file:/dev/./urandom
(note the /./ part, see
http://bugs.sun.com/view_bug.do?bug_id=6202721)
that makes Java use /dev/urandom instead, which is less secure, but much
faster, we could use it for tests, WDYT?
On 10/12/2010 07:47 AM, Vincent Massol wrote:
> Hi (Alex),
>
> Is it normal that CSRF tests take so long to execute on hudson (> 5mn for 7 unit
tests):
>
http://hudson.xwiki.org/job/xwiki-platform-core/org.xwiki.platform$xwiki-co…
>
> On my local machine they took 26 seconds.
>
> Thanks
> -Vincent