: > I intermittently face this issue sometimes while running the unit tests.

How exactly are you running the tests? ant? IDE? ... It's very strange 
that this would be an intermittent problem.

Can you please post the actual log details from the test so we can see the 
INFO & WARN level logging from assertNonBlockingRandomGeneratorAvailable() 
(just before this assertion would fail) ... I'm very curious what it was 
your java.security.egd value is (and where/why/how it's getting set).

: One more thing,  -Dtest.solr.allowed.securerandom=NativePRNG doesn't seem
: to help and I haven't tried the other option yet.

If test.solr.allowed.securerandom is being set properly (so that the 
forked Test JVM is getting it) then that assertion can't even be run (but 
a diff assertion is to vet that what you specify is what your JVM is 
using) ... one thing that may not be well explained in the docs is that 
when running tests from ant, you need to use '-Dargs=...' in order to pass 
"extra" arguments to the forked test VMs...

ant test -Dtestcase=SampleTest 
-Dargs='-Dtest.solr.allowed.securerandom=BogusPRNG'
...
   [junit4]   2> 1420 INFO  (SUITE-SampleTest-seed#[DDDB05C007992358]-worker) [ 
    ] o.a.s.SolrTestCaseJ4 SecureRandom sanity checks: 
test.solr.allowed.securerandom=BogusPRNG & java.security.egd=file:/dev/./urandom
...
   [junit4]    > Throwable #1: org.junit.ComparisonFailure: Algorithm specified 
using test.solr.allowed.securerandom system property does not match actual 
algorithm expected:<[Bogus]PRNG> but was:<[SHA1]PRNG>





-Hoss
http://www.lucidworks.com/

Reply via email to