openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r984535 - in /openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa: kernel/TestQuerySQLCache.java persistence/recursive/TestRecursiveRelationships.java
Date Wed, 11 Aug 2010 18:58:41 GMT
Author: mikedd
Date: Wed Aug 11 18:58:40 2010
New Revision: 984535

URL: http://svn.apache.org/viewvc?rev=984535&view=rev
Log:
Update testcases to clear tables before running. 

Modified:
    openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/kernel/TestQuerySQLCache.java
    openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/recursive/TestRecursiveRelationships.java

Modified: openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/kernel/TestQuerySQLCache.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/kernel/TestQuerySQLCache.java?rev=984535&r1=984534&r2=984535&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/kernel/TestQuerySQLCache.java
(original)
+++ openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/kernel/TestQuerySQLCache.java
Wed Aug 11 18:58:40 2010
@@ -291,6 +291,16 @@ public class TestQuerySQLCache
                 Persistence.createEntityManagerFactory("test", props));
         
         EntityManagerImpl em = (EntityManagerImpl)emf.createEntityManager();
+
+        em.getTransaction().begin();
+        em.createQuery("Delete from TblGrandChild").executeUpdate();
+        em.createQuery("Delete from TblChild").executeUpdate();
+        em.createQuery("Delete from TblParent").executeUpdate();
+        em.getTransaction().commit();
+        em.close();
+        
+        em = (EntityManagerImpl) emf.createEntityManager();
+        
         
         em.getTransaction().begin();
         for (int i = 0; i < 2; i++) {

Modified: openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/recursive/TestRecursiveRelationships.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/recursive/TestRecursiveRelationships.java?rev=984535&r1=984534&r2=984535&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/recursive/TestRecursiveRelationships.java
(original)
+++ openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/recursive/TestRecursiveRelationships.java
Wed Aug 11 18:58:40 2010
@@ -27,7 +27,7 @@ public class TestRecursiveRelationships 
     private int _l2Nodes = 3;
 
     public void setUp() {
-        setUp(Node.class);
+        setUp(Node.class, DROP_TABLES);
     }
 
     public void testRecursiveNodes() {



Mime
View raw message