Bug 51887 - Speedup sessionid generation when running testsuite
Speedup sessionid generation when running testsuite
Status: RESOLVED FIXED
Product: Tomcat 7
Classification: Unclassified
Component: Catalina
trunk
PC All
: P2 enhancement (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-09-24 14:09 UTC by Konstantin Kolinko
Modified: 2011-09-24 17:23 UTC (History)
0 users



Attachments
2011-09-24_tc8_DummySecureRandom.patch (2.83 KB, patch)
2011-09-24 14:09 UTC, Konstantin Kolinko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Kolinko 2011-09-24 14:09:54 UTC
Created attachment 27581 [details]
2011-09-24_tc8_DummySecureRandom.patch

When I run the Tomcat tests on Windows, I see a lot of following messages in the logs:

[junit] 24.09.2011 17:23:56 org.apache.catalina.util.SessionIdGenerator createSecureRandom
[junit] INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [5,019] milliseconds.

It is OK whan starting a single Tomcat instance, but when running tests it adds 5 seconds to each startup of Tomcat.


I am attaching patch that
1) Adds new DummySecureRandom class.
2) Hardcodes SessionIdGenerator to use this class.

The SessionIdGenerator part of the patch cannot be committed as is.
Comment 1 Mark Thomas 2011-09-24 17:23:42 UTC
Solution based on the proposed patch has been applied to trunk and 7.0.x and will be included in 7.0.22 onwards.