Author: andyhot
Date: Sun Nov 22 19:03:08 2009
New Revision: 883121

URL: http://svn.apache.org/viewvc?rev=883121&view=rev
Log:
Don't allow NPE when selenium tests weren't able to start

Modified:
    
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java

Modified: 
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java?rev=883121&r1=883120&r2=883121&view=diff
==============================================================================
--- 
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java
 (original)
+++ 
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java
 Sun Nov 22 19:03:08 2009
@@ -250,14 +250,23 @@
     @AfterClass(alwaysRun = true)
     public void cleanup() throws Exception
     {
-        selenium.stop();
-        selenium = null;
-
-        server.stop();
-        server = null;
-
-        jettyRunner.stop();
-        jettyRunner = null;
+       if (selenium!=null) 
+       {
+               selenium.stop();
+               selenium = null;
+       }
+
+       if (server!=null)
+       {
+               server.stop();
+               server = null;
+       }
+
+       if (jettyRunner!=null)
+       {
+               jettyRunner.stop();
+               jettyRunner = null;
+       }
     }
 
     @BeforeClass(alwaysRun = true)


Reply via email to