You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by an...@apache.org on 2009/11/22 20:05:39 UTC

svn commit: r883122 - /tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java

Author: andyhot
Date: Sun Nov 22 19:05:39 2009
New Revision: 883122

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

Modified:
    tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java

Modified: tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java?rev=883122&r1=883121&r2=883122&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java (original)
+++ tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java Sun Nov 22 19:05:39 2009
@@ -259,14 +259,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)