continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r793158 - /continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
Date Sat, 11 Jul 2009 00:47:20 GMT
Author: carlos
Date: Sat Jul 11 00:47:19 2009
New Revision: 793158

URL: http://svn.apache.org/viewvc?rev=793158&view=rev
Log:
Change the handling of thread local

Modified:
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java?rev=793158&r1=793157&r2=793158&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
Sat Jul 11 00:47:19 2009
@@ -47,7 +47,7 @@
 
     public static String maxWaitTimeInMs;
 
-    private static ThreadLocal<Selenium> selenium;
+    private static ThreadLocal<Selenium> selenium = new ThreadLocal<Selenium>();
 
     private static Properties p;
 
@@ -73,17 +73,10 @@
         throws Exception
     {
         this.baseUrl = baseUrl;
+
         if ( getSelenium() == null )
         {
-            final Selenium s = new DefaultSelenium( seleniumHost, seleniumPort, browser,
baseUrl );
-            selenium = new ThreadLocal<Selenium>()
-            {
-                @Override
-                protected Selenium initialValue()
-                {
-                    return s;
-                }
-            };
+            selenium.set( new DefaultSelenium( seleniumHost, seleniumPort, browser, baseUrl
) );
             getSelenium().start();
         }
     }
@@ -132,6 +125,7 @@
         if ( getSelenium() != null )
         {
             getSelenium().stop();
+            selenium.set( null );
         }
     }
 



Mime
View raw message