Author: andyhot
Date: Sun Nov 22 19:02:15 2009
New Revision: 883120
URL: http://svn.apache.org/viewvc?rev=883120&view=rev
Log:
Don't allow NPE when selenium tests weren't started + use defined testng version
Modified:
tapestry/tapestry5/branches/5.0/tapestry-test/pom.xml
tapestry/tapestry5/branches/5.0/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java
Modified: tapestry/tapestry5/branches/5.0/tapestry-test/pom.xml
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.0/tapestry-test/pom.xml?rev=883120&r1=883119&r2=883120&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.0/tapestry-test/pom.xml (original)
+++ tapestry/tapestry5/branches/5.0/tapestry-test/pom.xml Sun Nov 22 19:02:15
2009
@@ -35,7 +35,7 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>5.7</version>
+ <version>${testng-version}</version>
<classifier>jdk15</classifier>
<scope>compile</scope>
</dependency>
Modified:
tapestry/tapestry5/branches/5.0/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.0/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java?rev=883120&r1=883119&r2=883120&view=diff
==============================================================================
---
tapestry/tapestry5/branches/5.0/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java
(original)
+++
tapestry/tapestry5/branches/5.0/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java
Sun Nov 22 19:02:15 2009
@@ -246,14 +246,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)