Skip to content

Instantly share code, notes, and snippets.

@freynaud
Created June 3, 2011 13:28
Show Gist options
  • Save freynaud/1006340 to your computer and use it in GitHub Desktop.
Save freynaud/1006340 to your computer and use it in GitHub Desktop.
WebDriver Slow to start
### Eclipse Workspace Patch 1.0
#P selenium
Index: java/server/src/org/openqa/jetty/jetty/servlet/AbstractSessionManager.java
===================================================================
--- java/server/src/org/openqa/jetty/jetty/servlet/AbstractSessionManager.java (revision 12340)
+++ java/server/src/org/openqa/jetty/jetty/servlet/AbstractSessionManager.java (working copy)
@@ -479,16 +479,16 @@
if (_random==null)
{
log.debug("New random session seed");
- try
- {
- _random=SecureRandom.getInstance("SHA1PRNG");
- }
- catch (NoSuchAlgorithmException e)
+ // try
+ // {
+ _random=new Random(); //.getInstance("SHA1PRNG");
+ // }
+ /*catch (NoSuchAlgorithmException e)
{
log.warn("Could not generate SecureRandom for session-id randomness",e);
_random=new Random();
_weakRandom=true;
- }
+ }*/
_random.setSeed(_random.nextLong()^System.currentTimeMillis()^hashCode()^Runtime.getRuntime().freeMemory());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment