continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1594772 - in /continuum/trunk/continuum-data-management/data-management-jdo: ./ src/test/java/org/apache/maven/continuum/management/ src/test/resources/org/apache/maven/continuum/management/
Date Thu, 15 May 2014 05:57:02 GMT
Author: brett
Date: Thu May 15 05:57:01 2014
New Revision: 1594772

URL: http://svn.apache.org/r1594772
Log:
make test more resilient

Previously relied on executing in the correct order or identifiers could be
mismatched. Now upgrade HSQLDB and flush data and sequence tables between
tests so each is fresh

Modified:
    continuum/trunk/continuum-data-management/data-management-jdo/pom.xml
    continuum/trunk/continuum-data-management/data-management-jdo/src/test/java/org/apache/maven/continuum/management/DataManagementToolTest.java
    continuum/trunk/continuum-data-management/data-management-jdo/src/test/resources/org/apache/maven/continuum/management/DataManagementToolTest.xml

Modified: continuum/trunk/continuum-data-management/data-management-jdo/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-jdo/pom.xml?rev=1594772&r1=1594771&r2=1594772&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-jdo/pom.xml (original)
+++ continuum/trunk/continuum-data-management/data-management-jdo/pom.xml Thu May 15 05:57:01
2014
@@ -105,8 +105,9 @@
       </exclusions>
     </dependency>
     <dependency>
-      <groupId>hsqldb</groupId>
+      <groupId>org.hsqldb</groupId>
       <artifactId>hsqldb</artifactId>
+      <version>2.3.2</version>
       <scope>test</scope>
     </dependency>
     <dependency>

Modified: continuum/trunk/continuum-data-management/data-management-jdo/src/test/java/org/apache/maven/continuum/management/DataManagementToolTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-jdo/src/test/java/org/apache/maven/continuum/management/DataManagementToolTest.java?rev=1594772&r1=1594771&r2=1594772&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-jdo/src/test/java/org/apache/maven/continuum/management/DataManagementToolTest.java
(original)
+++ continuum/trunk/continuum-data-management/data-management-jdo/src/test/java/org/apache/maven/continuum/management/DataManagementToolTest.java
Thu May 15 05:57:01 2014
@@ -34,6 +34,9 @@ import java.io.FileWriter;
 import java.io.IOException;
 import java.io.StringReader;
 import java.io.StringWriter;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.Statement;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Locale;
@@ -61,6 +64,24 @@ public class DataManagementToolTest
         targetDirectory = createBackupDirectory();
     }
 
+    public void tearDown()
+        throws Exception
+    {
+        Connection connection = DriverManager.getConnection( "jdbc:hsqldb:mem:." );
+        Statement stmt = connection.createStatement();
+        try
+        {
+            stmt.execute("TRUNCATE SCHEMA PUBLIC RESTART IDENTITY AND COMMIT NO CHECK");
+            connection.commit();
+        }
+        finally
+        {
+            stmt.close();
+            connection.close();
+        }
+        super.tearDown();
+    }
+
 /*
     protected ContinuumStore createStore()
         throws Exception

Modified: continuum/trunk/continuum-data-management/data-management-jdo/src/test/resources/org/apache/maven/continuum/management/DataManagementToolTest.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-data-management/data-management-jdo/src/test/resources/org/apache/maven/continuum/management/DataManagementToolTest.xml?rev=1594772&r1=1594771&r2=1594772&view=diff
==============================================================================
--- continuum/trunk/continuum-data-management/data-management-jdo/src/test/resources/org/apache/maven/continuum/management/DataManagementToolTest.xml
(original)
+++ continuum/trunk/continuum-data-management/data-management-jdo/src/test/resources/org/apache/maven/continuum/management/DataManagementToolTest.xml
Thu May 15 05:57:01 2014
@@ -26,7 +26,7 @@
       <configuration>
         <!-- Database Configuration -->
         <driverName>org.hsqldb.jdbcDriver</driverName>
-        <url>jdbc:hsqldb:mem:database</url>
+        <url>jdbc:hsqldb:mem:.</url>
         <userName>sa</userName>
         <password></password>
         <persistenceManagerFactoryClass>org.jpox.PersistenceManagerFactoryImpl</persistenceManagerFactoryClass>



Mime
View raw message