Summary: | Speedup sessionid generation when running testsuite | ||
---|---|---|---|
Product: | Tomcat 7 | Reporter: | Konstantin Kolinko <knst.kolinko> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | P2 | ||
Version: | trunk | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Attachments: | 2011-09-24_tc8_DummySecureRandom.patch |
Solution based on the proposed patch has been applied to trunk and 7.0.x and will be included in 7.0.22 onwards. |
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.