continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r796152 - /continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/selenium/SeleniumListener.java
Date Tue, 21 Jul 2009 06:12:10 GMT
Author: carlos
Date: Tue Jul 21 06:12:09 2009
New Revision: 796152

URL: http://svn.apache.org/viewvc?rev=796152&view=rev
Log:
ignore errors if session has been already stopped

Modified:
    continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/selenium/SeleniumListener.java

Modified: continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/selenium/SeleniumListener.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/selenium/SeleniumListener.java?rev=796152&r1=796151&r2=796152&view=diff
==============================================================================
--- continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/selenium/SeleniumListener.java
(original)
+++ continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/selenium/SeleniumListener.java
Tue Jul 21 06:12:09 2009
@@ -95,14 +95,22 @@
                 {
                     if ( session.isStarted() )
                     {
-                        logger.info( "Stoping selenium session {}", session.configurationString()
);
+                        logger.info( "Stopping selenium session {}", session.configurationString()
);
                         session.stop();
-                        it.remove();
                     }
                 }
                 catch ( RuntimeException e )
                 {
-                    logger.error( "Error stoping selenium server: " + session.configurationString(),
e );
+                    /* ignore errors if session has been already stopped */
+                    if ( ( e.getMessage() != null )
+                        && !e.getMessage().startsWith( "ERROR: Selenium Driver error:
session already stopped:" ) )
+                    {
+                        logger.error( "Error stopping selenium server: " + session.configurationString(),
e );
+                    }
+                }
+                finally
+                {
+                    it.remove();
                 }
             }
         }



Mime
View raw message