db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcai...@apache.org
Subject svn commit: r169919 - /incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager
Date Fri, 13 May 2005 02:35:13 GMT
Author: mcaisse
Date: Thu May 12 19:35:11 2005
New Revision: 169919

URL: http://svn.apache.org/viewcvs?rev=169919&view=rev
Log:
JDO-40, 41

Modified:
    incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/CloseThrowsExceptionWhenActiveTx.java
    incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/ConcurrentPersistenceManagersSameClasses.java
    incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/EvictingWithRestoreValuesFalse.java
    incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/EvictingWithRetainValuesFalse.java
    incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/GetExtentWithInstancesMadePersistentViaReachability.java
    incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/GetExtentWithSubclasses.java
    incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/GetObjectByIdWithValidationInstanceNotInCacheNotInDatastore.java
    incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/MakePersistentAndInstancesNotReachable.java
    incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/ObjectIdUniqueAmongInstances.java
    incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/OneInstanceOfObjectPerPersistenceManager.java
    incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/PersistenceManagerTest.java
    incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/RefreshAllWithNoParameters.java
    incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/Retrieve.java

Modified: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/CloseThrowsExceptionWhenActiveTx.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/CloseThrowsExceptionWhenActiveTx.java?rev=169919&r1=169918&r2=169919&view=diff
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/CloseThrowsExceptionWhenActiveTx.java
(original)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/CloseThrowsExceptionWhenActiveTx.java
Thu May 12 19:35:11 2005
@@ -20,7 +20,6 @@
 import javax.jdo.PersistenceManager;
 import javax.jdo.Transaction;
 
-import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.util.BatchTestRunner;
 
 /**
@@ -34,7 +33,7 @@
 In a non-managed environment, if the current transaction is active, close throws JDOUserException.
  */
 
-public class CloseThrowsExceptionWhenActiveTx extends JDO_Test {
+public class CloseThrowsExceptionWhenActiveTx extends PersistenceManagerTest {
     
     /** */
     private static final String ASSERTION_FAILED = 

Modified: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/ConcurrentPersistenceManagersSameClasses.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/ConcurrentPersistenceManagersSameClasses.java?rev=169919&r1=169918&r2=169919&view=diff
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/ConcurrentPersistenceManagersSameClasses.java
(original)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/ConcurrentPersistenceManagersSameClasses.java
Thu May 12 19:35:11 2005
@@ -27,7 +27,6 @@
 import javax.jdo.Query;
 import javax.jdo.Transaction;
 
-import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.mylib.PCPoint;
 import org.apache.jdo.tck.pc.mylib.PCRect;
 import org.apache.jdo.tck.util.BatchTestRunner;
@@ -45,7 +44,7 @@
 
  */
 
-public class ConcurrentPersistenceManagersSameClasses extends JDO_Test {
+public class ConcurrentPersistenceManagersSameClasses extends PersistenceManagerTest {
 
     /** */
     private static final String ASSERTION_FAILED = 

Modified: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/EvictingWithRestoreValuesFalse.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/EvictingWithRestoreValuesFalse.java?rev=169919&r1=169918&r2=169919&view=diff
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/EvictingWithRestoreValuesFalse.java
(original)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/EvictingWithRestoreValuesFalse.java
Thu May 12 19:35:11 2005
@@ -20,7 +20,6 @@
 import javax.jdo.PersistenceManager;
 import javax.jdo.Transaction;
 
-import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.mylib.PCPoint2;
 import org.apache.jdo.tck.util.BatchTestRunner;
 
@@ -45,7 +44,7 @@
 
  */
 
-public class EvictingWithRestoreValuesFalse extends JDO_Test {
+public class EvictingWithRestoreValuesFalse extends PersistenceManagerTest {
 
     /** */
     private static final String ASSERTION_FAILED = 

Modified: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/EvictingWithRetainValuesFalse.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/EvictingWithRetainValuesFalse.java?rev=169919&r1=169918&r2=169919&view=diff
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/EvictingWithRetainValuesFalse.java
(original)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/EvictingWithRetainValuesFalse.java
Thu May 12 19:35:11 2005
@@ -20,7 +20,6 @@
 import javax.jdo.PersistenceManager;
 import javax.jdo.Transaction;
 
-import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.mylib.PCPoint2;
 import org.apache.jdo.tck.util.BatchTestRunner;
 
@@ -45,7 +44,7 @@
 
  */
 
-public class EvictingWithRetainValuesFalse extends JDO_Test {
+public class EvictingWithRetainValuesFalse extends PersistenceManagerTest {
 
     /** */
     private static final String ASSERTION_FAILED = 

Modified: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/GetExtentWithInstancesMadePersistentViaReachability.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/GetExtentWithInstancesMadePersistentViaReachability.java?rev=169919&r1=169918&r2=169919&view=diff
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/GetExtentWithInstancesMadePersistentViaReachability.java
(original)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/GetExtentWithInstancesMadePersistentViaReachability.java
Thu May 12 19:35:11 2005
@@ -23,8 +23,6 @@
 import javax.jdo.PersistenceManager;
 import javax.jdo.Transaction;
 
-import org.apache.jdo.tck.JDO_Test;
-
 import org.apache.jdo.tck.pc.company.Company;
 import org.apache.jdo.tck.pc.company.Department;
 import org.apache.jdo.tck.pc.company.Address;
@@ -42,7 +40,7 @@
 If an instance of a class or interface that has a managed extent is made persistent via reachability,
the instance is put into the extent implicitly.
  */
 
-public class GetExtentWithInstancesMadePersistentViaReachability extends JDO_Test {
+public class GetExtentWithInstancesMadePersistentViaReachability extends PersistenceManagerTest
{
 
     /** */
     private static final String ASSERTION_FAILED = 

Modified: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/GetExtentWithSubclasses.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/GetExtentWithSubclasses.java?rev=169919&r1=169918&r2=169919&view=diff
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/GetExtentWithSubclasses.java
(original)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/GetExtentWithSubclasses.java
Thu May 12 19:35:11 2005
@@ -23,8 +23,6 @@
 import javax.jdo.PersistenceManager;
 import javax.jdo.Transaction;
 
-import org.apache.jdo.tck.JDO_Test;
-
 import org.apache.jdo.tck.pc.company.Person;
 import org.apache.jdo.tck.pc.company.Employee;
 import org.apache.jdo.tck.pc.company.PartTimeEmployee;
@@ -43,7 +41,7 @@
 The getExtent method returns an Extent that contains all of the instances in the parameter
class or interface, and if the subclasses flag is true, all of the instances of the parameter
class and its subclasses.
  */
 
-public class GetExtentWithSubclasses extends JDO_Test {
+public class GetExtentWithSubclasses extends PersistenceManagerTest {
 
     /** */
     private static final String ASSERTION_FAILED = 

Modified: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/GetObjectByIdWithValidationInstanceNotInCacheNotInDatastore.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/GetObjectByIdWithValidationInstanceNotInCacheNotInDatastore.java?rev=169919&r1=169918&r2=169919&view=diff
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/GetObjectByIdWithValidationInstanceNotInCacheNotInDatastore.java
(original)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/GetObjectByIdWithValidationInstanceNotInCacheNotInDatastore.java
Thu May 12 19:35:11 2005
@@ -20,7 +20,6 @@
 import javax.jdo.PersistenceManager;
 import javax.jdo.Transaction;
 
-import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.mylib.PCPoint;
 import org.apache.jdo.tck.util.BatchTestRunner;
 
@@ -35,7 +34,7 @@
 Object getObjectById (Object oid, boolean validate) with validate==true. If the instance
does not exist in the datastore, then a JDOObjectNotFoundException is thrown.
  */
 
-public class GetObjectByIdWithValidationInstanceNotInCacheNotInDatastore extends JDO_Test
{
+public class GetObjectByIdWithValidationInstanceNotInCacheNotInDatastore extends PersistenceManagerTest
{
 
     /** */
     private static final String ASSERTION_FAILED = 

Modified: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/MakePersistentAndInstancesNotReachable.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/MakePersistentAndInstancesNotReachable.java?rev=169919&r1=169918&r2=169919&view=diff
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/MakePersistentAndInstancesNotReachable.java
(original)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/MakePersistentAndInstancesNotReachable.java
Thu May 12 19:35:11 2005
@@ -23,8 +23,6 @@
 import javax.jdo.PersistenceManager;
 import javax.jdo.Transaction;
 
-import org.apache.jdo.tck.JDO_Test;
-
 import org.apache.jdo.tck.pc.company.Company;
 import org.apache.jdo.tck.pc.company.Department;
 import org.apache.jdo.tck.pc.company.Address;
@@ -48,7 +46,7 @@
 currently reachable from persistent instances will revert to transient.
  */
 
-public class MakePersistentAndInstancesNotReachable extends JDO_Test {
+public class MakePersistentAndInstancesNotReachable extends PersistenceManagerTest {
 
     /** */
     private static final String ASSERTION_FAILED = 

Modified: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/ObjectIdUniqueAmongInstances.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/ObjectIdUniqueAmongInstances.java?rev=169919&r1=169918&r2=169919&view=diff
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/ObjectIdUniqueAmongInstances.java
(original)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/ObjectIdUniqueAmongInstances.java
Thu May 12 19:35:11 2005
@@ -22,7 +22,6 @@
 
 import javax.jdo.Transaction;
 
-import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.mylib.PCPoint;
 import org.apache.jdo.tck.util.BatchTestRunner;
 
@@ -41,7 +40,7 @@
 
  */
 
-public class ObjectIdUniqueAmongInstances extends JDO_Test {
+public class ObjectIdUniqueAmongInstances extends PersistenceManagerTest {
     
     /** */
     private static final String ASSERTION_FAILED = 

Modified: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/OneInstanceOfObjectPerPersistenceManager.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/OneInstanceOfObjectPerPersistenceManager.java?rev=169919&r1=169918&r2=169919&view=diff
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/OneInstanceOfObjectPerPersistenceManager.java
(original)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/OneInstanceOfObjectPerPersistenceManager.java
Thu May 12 19:35:11 2005
@@ -23,7 +23,6 @@
 import javax.jdo.Query;
 import javax.jdo.Transaction;
 
-import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.mylib.PCPoint;
 import org.apache.jdo.tck.pc.mylib.PCRect;
 import org.apache.jdo.tck.util.BatchTestRunner;
@@ -43,7 +42,7 @@
 
  */
 
-public class OneInstanceOfObjectPerPersistenceManager extends JDO_Test {
+public class OneInstanceOfObjectPerPersistenceManager extends PersistenceManagerTest {
     
     /** */
     private static final String ASSERTION_FAILED = 

Modified: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/PersistenceManagerTest.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/PersistenceManagerTest.java?rev=169919&r1=169918&r2=169919&view=diff
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/PersistenceManagerTest.java
(original)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/PersistenceManagerTest.java
Thu May 12 19:35:11 2005
@@ -25,6 +25,8 @@
 import javax.jdo.Transaction;
 
 import org.apache.jdo.tck.JDO_Test;
+import org.apache.jdo.tck.pc.company.Company;
+import org.apache.jdo.tck.pc.company.Department;
 import org.apache.jdo.tck.pc.mylib.PCPoint;
 import org.apache.jdo.tck.pc.mylib.PCPoint2;
 import org.apache.jdo.tck.pc.mylib.PCRect;
@@ -40,6 +42,7 @@
         try {
             cleanup();
             cleanupMylib();
+            cleanupCompany();
         }
         catch (Throwable ex) {
             cleanupFailure = ex;
@@ -69,6 +72,28 @@
             Collection c = getAllObjects(pm, PCRect.class);
             pm.deletePersistentAll(c);
             c = getAllObjects(pm, PCPoint.class);
+            pm.deletePersistentAll(c);
+            tx.commit();
+        }
+        finally {
+            if ((tx != null) && tx.isActive())
+                tx.rollback();
+            if ((pm != null) && pm.isClosed())
+                pm.close();
+        }
+  }
+
+     /** */
+    protected void cleanupCompany() {
+        PersistenceManager pm = getPM();
+        Transaction tx = null;
+        try {
+            pm = pmf.getPersistenceManager();
+            tx = pm.currentTransaction();
+            tx.begin();
+            Collection c = getAllObjects(pm, Department.class);
+            pm.deletePersistentAll(c);
+            c = getAllObjects(pm, Company.class);
             pm.deletePersistentAll(c);
             tx.commit();
         }

Modified: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/RefreshAllWithNoParameters.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/RefreshAllWithNoParameters.java?rev=169919&r1=169918&r2=169919&view=diff
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/RefreshAllWithNoParameters.java
(original)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/RefreshAllWithNoParameters.java
Thu May 12 19:35:11 2005
@@ -20,7 +20,6 @@
 import javax.jdo.PersistenceManager;
 import javax.jdo.Transaction;
 
-import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.mylib.PCPoint;
 import org.apache.jdo.tck.util.BatchTestRunner;
 
@@ -47,7 +46,7 @@
 
  */
 
-public class RefreshAllWithNoParameters extends JDO_Test {
+public class RefreshAllWithNoParameters extends PersistenceManagerTest {
     
     /** */
     private static final String ASSERTION_FAILED = 

Modified: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/Retrieve.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/Retrieve.java?rev=169919&r1=169918&r2=169919&view=diff
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/Retrieve.java
(original)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/api/persistencemanager/Retrieve.java
Thu May 12 19:35:11 2005
@@ -23,8 +23,6 @@
 import javax.jdo.PersistenceManager;
 import javax.jdo.Transaction;
 
-import org.apache.jdo.tck.JDO_Test;
-
 import org.apache.jdo.tck.pc.mylib.PCPoint;
 import org.apache.jdo.tck.pc.mylib.PCPoint2;
 import org.apache.jdo.tck.pc.mylib.PCRect;
@@ -48,7 +46,7 @@
 and if the class of the instance implements InstanceCallbacks calls jdoPostLoad.
  */
 
-public class Retrieve extends JDO_Test {
+public class Retrieve extends PersistenceManagerTest {
 
     /** */
     private static final String ASSERTION_FAILED = 



Mime
View raw message