db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcai...@apache.org
Subject svn commit: r628176 - in /db/jdo/trunk/tck2/src: conf/iut-jdoconfig.xml conf/jdori-jdoconfig.xml conf/pmf.conf conf/runonce.conf java/org/apache/jdo/tck/JDO_Test.java java/org/apache/jdo/tck/api/persistencemanagerfactory/config/Jdoconfig.java
Date Fri, 15 Feb 2008 21:32:48 GMT
Author: mcaisse
Date: Fri Feb 15 13:32:47 2008
New Revision: 628176

URL: http://svn.apache.org/viewvc?rev=628176&view=rev
Log:
JDO-576 Make tests work on both identity types

Modified:
    db/jdo/trunk/tck2/src/conf/iut-jdoconfig.xml
    db/jdo/trunk/tck2/src/conf/jdori-jdoconfig.xml
    db/jdo/trunk/tck2/src/conf/pmf.conf
    db/jdo/trunk/tck2/src/conf/runonce.conf
    db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/JDO_Test.java
    db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/config/Jdoconfig.java

Modified: db/jdo/trunk/tck2/src/conf/iut-jdoconfig.xml
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/conf/iut-jdoconfig.xml?rev=628176&r1=628175&r2=628176&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/conf/iut-jdoconfig.xml (original)
+++ db/jdo/trunk/tck2/src/conf/iut-jdoconfig.xml Fri Feb 15 13:32:47 2008
@@ -20,9 +20,7 @@
     xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
-
-    <!--
-    -->
+    
     <persistence-manager-factory
         class="org.jpox.PersistenceManagerFactoryImpl"
         connection-driver-name="org.apache.derby.jdbc.EmbeddedDriver"
@@ -34,23 +32,23 @@
         retain-values="false"
         mapping="derby"
     >
-    <property name="javax.jdo.mapping.Schema" value="applicationidentity0"/> 
-    <property name="javax.jdo.option.Mapping" value="standard"/>
-    <property name="jdo.tck.mapping" value="0"/>
-    <property name="org.jpox.metadata.validate" value="false"/>
-    <property name="org.jpox.validateTables" value="false"/>
-    <property name="org.jpox.validateConstraints" value="false"/>
-    <property name="org.jpox.autoCreateSchema" value="false"/>
-    <property name="org.jpox.autoCreateTables" value="false"/>
-    <property name="org.jpox.autoCreateConstraints" value="false"/>
-    <property name="org.jpox.autoCreateColumns" value="false"/>
-    <property name="org.jpox.rdbms.CheckExistTablesOrViews" value="false"/>
-    <property name="org.jpox.autoStartMechanism" value="None"/>
-    <property name="org.jpox.connectionPoolingType" value="C3P0"/>
-    <property name="org.jpox.implementationCreatorName" value="asm"/>
+        <property name="javax.jdo.mapping.Schema" value="schemaDoesNotExist"/> 
+        <property name="javax.jdo.option.Mapping" value="standard"/>
+        <property name="jdo.tck.mapping" value="0"/>
+        <property name="org.jpox.metadata.validate" value="false"/>
+        <property name="org.jpox.validateTables" value="false"/>
+        <property name="org.jpox.validateConstraints" value="false"/>
+        <property name="org.jpox.autoCreateSchema" value="false"/>
+        <property name="org.jpox.autoCreateTables" value="false"/>
+        <property name="org.jpox.autoCreateConstraints" value="false"/>
+        <property name="org.jpox.autoCreateColumns" value="false"/>
+        <property name="org.jpox.rdbms.CheckExistTablesOrViews" value="false"/>
+        <property name="org.jpox.autoStartMechanism" value="None"/>
+        <property name="org.jpox.connectionPoolingType" value="C3P0"/>
+        <property name="org.jpox.implementationCreatorName" value="asm"/>
     </persistence-manager-factory>
-
-     <persistence-manager-factory
+    
+    <persistence-manager-factory
         name="namedPMF0"
         class="org.jpox.PersistenceManagerFactoryImpl"
         connection-driver-name="org.apache.derby.jdbc.EmbeddedDriver"
@@ -61,22 +59,22 @@
         restore-values="false"
         retain-values="false"
     >
-
-    <property name="javax.jdo.mapping.Schema" value="applicationidentity0"/> 
-    <property name="javax.jdo.option.Mapping" value="standard"/>
-    <property name="org.jpox.metadata.validate" value="false"/>
-    <property name="org.jpox.validateTables" value="false"/>
-    <property name="org.jpox.validateConstraints" value="false"/>
-    <property name="org.jpox.autoCreateSchema" value="false"/>
-    <property name="org.jpox.autoCreateTables" value="false"/>
-    <property name="org.jpox.autoCreateConstraints" value="false"/>
-    <property name="org.jpox.autoCreateColumns" value="false"/>
-    <property name="org.jpox.rdbms.CheckExistTablesOrViews" value="false"/>
-    <property name="org.jpox.autoStartMechanism" value="None"/>
-    <property name="org.jpox.connectionPoolingType" value="C3P0"/>
-    <property name="org.jpox.implementationCreatorName" value="asm"/>
+        
+        <property name="javax.jdo.mapping.Schema" value="schemaDoesNotExist"/> 
+        <property name="javax.jdo.option.Mapping" value="standard"/>
+        <property name="org.jpox.metadata.validate" value="false"/>
+        <property name="org.jpox.validateTables" value="false"/>
+        <property name="org.jpox.validateConstraints" value="false"/>
+        <property name="org.jpox.autoCreateSchema" value="false"/>
+        <property name="org.jpox.autoCreateTables" value="false"/>
+        <property name="org.jpox.autoCreateConstraints" value="false"/>
+        <property name="org.jpox.autoCreateColumns" value="false"/>
+        <property name="org.jpox.rdbms.CheckExistTablesOrViews" value="false"/>
+        <property name="org.jpox.autoStartMechanism" value="None"/>
+        <property name="org.jpox.connectionPoolingType" value="C3P0"/>
+        <property name="org.jpox.implementationCreatorName" value="asm"/>
     </persistence-manager-factory>
-
+    
     <persistence-manager-factory
         name=" namedPMF1  "
         class="org.jpox.PersistenceManagerFactoryImpl"
@@ -88,22 +86,22 @@
         restore-values="true"
         retain-values="false"
     >
-
-    <property name="javax.jdo.mapping.Schema" value="applicationidentity0"/> 
-    <property name="javax.jdo.option.Mapping" value="standard"/>
-    <property name="org.jpox.metadata.validate" value="false"/>
-    <property name="org.jpox.validateTables" value="false"/>
-    <property name="org.jpox.validateConstraints" value="false"/>
-    <property name="org.jpox.autoCreateSchema" value="false"/>
-    <property name="org.jpox.autoCreateTables" value="false"/>
-    <property name="org.jpox.autoCreateConstraints" value="false"/>
-    <property name="org.jpox.autoCreateColumns" value="false"/>
-    <property name="org.jpox.rdbms.CheckExistTablesOrViews" value="false"/>
-    <property name="org.jpox.autoStartMechanism" value="None"/>
-    <property name="org.jpox.connectionPoolingType" value="C3P0"/>
-    <property name="org.jpox.implementationCreatorName" value="asm"/>
+        
+        <property name="javax.jdo.mapping.Schema" value="schemaDoesNotExist"/> 
+        <property name="javax.jdo.option.Mapping" value="standard"/>
+        <property name="org.jpox.metadata.validate" value="false"/>
+        <property name="org.jpox.validateTables" value="false"/>
+        <property name="org.jpox.validateConstraints" value="false"/>
+        <property name="org.jpox.autoCreateSchema" value="false"/>
+        <property name="org.jpox.autoCreateTables" value="false"/>
+        <property name="org.jpox.autoCreateConstraints" value="false"/>
+        <property name="org.jpox.autoCreateColumns" value="false"/>
+        <property name="org.jpox.rdbms.CheckExistTablesOrViews" value="false"/>
+        <property name="org.jpox.autoStartMechanism" value="None"/>
+        <property name="org.jpox.connectionPoolingType" value="C3P0"/>
+        <property name="org.jpox.implementationCreatorName" value="asm"/>
     </persistence-manager-factory>
-
+    
     <persistence-manager-factory
         name="pmfTestInstanceLifecycleListener"
         class="org.jpox.PersistenceManagerFactoryImpl"
@@ -115,27 +113,27 @@
         restore-values="false"
         retain-values="false"
     >
-
-    <property name="javax.jdo.mapping.Schema" value="applicationidentity0"/> 
-    <property name="javax.jdo.option.Mapping" value="standard"/>
-    <property name="org.jpox.metadata.validate" value="false"/>
-    <property name="org.jpox.validateTables" value="false"/>
-    <property name="org.jpox.validateConstraints" value="false"/>
-    <property name="org.jpox.autoCreateSchema" value="false"/>
-    <property name="org.jpox.autoCreateTables" value="false"/>
-    <property name="org.jpox.autoCreateConstraints" value="false"/>
-    <property name="org.jpox.autoCreateColumns" value="false"/>
-    <property name="org.jpox.rdbms.CheckExistTablesOrViews" value="false"/>
-    <property name="org.jpox.autoStartMechanism" value="None"/>
-    <property name="org.jpox.connectionPoolingType" value="C3P0"/>
-    <property name="org.jpox.implementationCreatorName" value="asm"/> 
-
-    <instance-lifecycle-listener
-        listener="listener.listener0"
-        classes="classes.classes0"
-    />
+        
+        <property name="javax.jdo.mapping.Schema" value="schemaDoesNotExist"/> 
+        <property name="javax.jdo.option.Mapping" value="standard"/>
+        <property name="org.jpox.metadata.validate" value="false"/>
+        <property name="org.jpox.validateTables" value="false"/>
+        <property name="org.jpox.validateConstraints" value="false"/>
+        <property name="org.jpox.autoCreateSchema" value="false"/>
+        <property name="org.jpox.autoCreateTables" value="false"/>
+        <property name="org.jpox.autoCreateConstraints" value="false"/>
+        <property name="org.jpox.autoCreateColumns" value="false"/>
+        <property name="org.jpox.rdbms.CheckExistTablesOrViews" value="false"/>
+        <property name="org.jpox.autoStartMechanism" value="None"/>
+        <property name="org.jpox.connectionPoolingType" value="C3P0"/>
+        <property name="org.jpox.implementationCreatorName" value="asm"/> 
+        
+        <instance-lifecycle-listener
+            listener="listener.listener0"
+            classes="classes.classes0"
+        />
         
     </persistence-manager-factory>
-
+    
 </jdoconfig>
 

Modified: db/jdo/trunk/tck2/src/conf/jdori-jdoconfig.xml
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/conf/jdori-jdoconfig.xml?rev=628176&r1=628175&r2=628176&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/conf/jdori-jdoconfig.xml (original)
+++ db/jdo/trunk/tck2/src/conf/jdori-jdoconfig.xml Fri Feb 15 13:32:47 2008
@@ -19,7 +19,7 @@
     xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
-
+    
     <!--
         Default unnamed pmf
     -->
@@ -34,23 +34,23 @@
         retain-values="false"
         mapping="derby"
     >
-    <property name="javax.jdo.mapping.Schema" value="applicationidentity0"/> 
-    <property name="javax.jdo.option.Mapping" value="standard"/>
-    <property name="jdo.tck.mapping" value="0"/>
-    <property name="org.jpox.metadata.validate" value="false"/>
-    <property name="org.jpox.validateTables" value="false"/>
-    <property name="org.jpox.validateConstraints" value="false"/>
-    <property name="org.jpox.autoCreateSchema" value="false"/>
-    <property name="org.jpox.autoCreateTables" value="false"/>
-    <property name="org.jpox.autoCreateConstraints" value="false"/>
-    <property name="org.jpox.autoCreateColumns" value="false"/>
-    <property name="org.jpox.rdbms.CheckExistTablesOrViews" value="false"/>
-    <property name="org.jpox.autoStartMechanism" value="None"/>
-    <property name="org.jpox.connectionPoolingType" value="C3P0"/>
-    <property name="org.jpox.implementationCreatorName" value="asm"/>
+        <property name="javax.jdo.mapping.Schema" value="schemaDoesNotExist"/> 
+        <property name="javax.jdo.option.Mapping" value="standard"/>
+        <property name="jdo.tck.mapping" value="0"/>
+        <property name="org.jpox.metadata.validate" value="false"/>
+        <property name="org.jpox.validateTables" value="false"/>
+        <property name="org.jpox.validateConstraints" value="false"/>
+        <property name="org.jpox.autoCreateSchema" value="false"/>
+        <property name="org.jpox.autoCreateTables" value="false"/>
+        <property name="org.jpox.autoCreateConstraints" value="false"/>
+        <property name="org.jpox.autoCreateColumns" value="false"/>
+        <property name="org.jpox.rdbms.CheckExistTablesOrViews" value="false"/>
+        <property name="org.jpox.autoStartMechanism" value="None"/>
+        <property name="org.jpox.connectionPoolingType" value="C3P0"/>
+        <property name="org.jpox.implementationCreatorName" value="asm"/>
     </persistence-manager-factory>
-
-     <persistence-manager-factory
+    
+    <persistence-manager-factory
         name="namedPMF0"
         class="org.jpox.PersistenceManagerFactoryImpl"
         connection-driver-name="org.apache.derby.jdbc.EmbeddedDriver"
@@ -61,22 +61,22 @@
         restore-values="false"
         retain-values="false"
     >
-
-    <property name="javax.jdo.mapping.Schema" value="applicationidentity0"/> 
-    <property name="javax.jdo.option.Mapping" value="standard"/>
-    <property name="org.jpox.metadata.validate" value="false"/>
-    <property name="org.jpox.validateTables" value="false"/>
-    <property name="org.jpox.validateConstraints" value="false"/>
-    <property name="org.jpox.autoCreateSchema" value="false"/>
-    <property name="org.jpox.autoCreateTables" value="false"/>
-    <property name="org.jpox.autoCreateConstraints" value="false"/>
-    <property name="org.jpox.autoCreateColumns" value="false"/>
-    <property name="org.jpox.rdbms.CheckExistTablesOrViews" value="false"/>
-    <property name="org.jpox.autoStartMechanism" value="None"/>
-    <property name="org.jpox.connectionPoolingType" value="C3P0"/>
-    <property name="org.jpox.implementationCreatorName" value="asm"/>
+        
+        <property name="javax.jdo.mapping.Schema" value="schemaDoesNotExist"/> 
+        <property name="javax.jdo.option.Mapping" value="standard"/>
+        <property name="org.jpox.metadata.validate" value="false"/>
+        <property name="org.jpox.validateTables" value="false"/>
+        <property name="org.jpox.validateConstraints" value="false"/>
+        <property name="org.jpox.autoCreateSchema" value="false"/>
+        <property name="org.jpox.autoCreateTables" value="false"/>
+        <property name="org.jpox.autoCreateConstraints" value="false"/>
+        <property name="org.jpox.autoCreateColumns" value="false"/>
+        <property name="org.jpox.rdbms.CheckExistTablesOrViews" value="false"/>
+        <property name="org.jpox.autoStartMechanism" value="None"/>
+        <property name="org.jpox.connectionPoolingType" value="C3P0"/>
+        <property name="org.jpox.implementationCreatorName" value="asm"/>
     </persistence-manager-factory>
-
+    
     <persistence-manager-factory
         name=" namedPMF1  "
         class="org.jpox.PersistenceManagerFactoryImpl"
@@ -88,22 +88,22 @@
         restore-values="true"
         retain-values="false"
     >
-
-    <property name="javax.jdo.mapping.Schema" value="applicationidentity0"/> 
-    <property name="javax.jdo.option.Mapping" value="standard"/>
-    <property name="org.jpox.metadata.validate" value="false"/>
-    <property name="org.jpox.validateTables" value="false"/>
-    <property name="org.jpox.validateConstraints" value="false"/>
-    <property name="org.jpox.autoCreateSchema" value="false"/>
-    <property name="org.jpox.autoCreateTables" value="false"/>
-    <property name="org.jpox.autoCreateConstraints" value="false"/>
-    <property name="org.jpox.autoCreateColumns" value="false"/>
-    <property name="org.jpox.rdbms.CheckExistTablesOrViews" value="false"/>
-    <property name="org.jpox.autoStartMechanism" value="None"/>
-    <property name="org.jpox.connectionPoolingType" value="C3P0"/>
-    <property name="org.jpox.implementationCreatorName" value="asm"/>
+        
+        <property name="javax.jdo.mapping.Schema" value="schemaDoesNotExist"/> 
+        <property name="javax.jdo.option.Mapping" value="standard"/>
+        <property name="org.jpox.metadata.validate" value="false"/>
+        <property name="org.jpox.validateTables" value="false"/>
+        <property name="org.jpox.validateConstraints" value="false"/>
+        <property name="org.jpox.autoCreateSchema" value="false"/>
+        <property name="org.jpox.autoCreateTables" value="false"/>
+        <property name="org.jpox.autoCreateConstraints" value="false"/>
+        <property name="org.jpox.autoCreateColumns" value="false"/>
+        <property name="org.jpox.rdbms.CheckExistTablesOrViews" value="false"/>
+        <property name="org.jpox.autoStartMechanism" value="None"/>
+        <property name="org.jpox.connectionPoolingType" value="C3P0"/>
+        <property name="org.jpox.implementationCreatorName" value="asm"/>
     </persistence-manager-factory>
-
+    
     <persistence-manager-factory
         name="pmfTestInstanceLifecycleListener"
         class="org.jpox.PersistenceManagerFactoryImpl"
@@ -115,27 +115,27 @@
         restore-values="false"
         retain-values="false"
     >
-
-    <property name="javax.jdo.mapping.Schema" value="applicationidentity0"/> 
-    <property name="javax.jdo.option.Mapping" value="standard"/>
-    <property name="org.jpox.metadata.validate" value="false"/>
-    <property name="org.jpox.validateTables" value="false"/>
-    <property name="org.jpox.validateConstraints" value="false"/>
-    <property name="org.jpox.autoCreateSchema" value="false"/>
-    <property name="org.jpox.autoCreateTables" value="false"/>
-    <property name="org.jpox.autoCreateConstraints" value="false"/>
-    <property name="org.jpox.autoCreateColumns" value="false"/>
-    <property name="org.jpox.rdbms.CheckExistTablesOrViews" value="false"/>
-    <property name="org.jpox.autoStartMechanism" value="None"/>
-    <property name="org.jpox.connectionPoolingType" value="C3P0"/>
-    <property name="org.jpox.implementationCreatorName" value="asm"/> 
-
-    <instance-lifecycle-listener
-        listener="listener.listener0"
-        classes="classes.classes0"
-    />
+        
+        <property name="javax.jdo.mapping.Schema" value="schemaDoesNotExist"/> 
+        <property name="javax.jdo.option.Mapping" value="standard"/>
+        <property name="org.jpox.metadata.validate" value="false"/>
+        <property name="org.jpox.validateTables" value="false"/>
+        <property name="org.jpox.validateConstraints" value="false"/>
+        <property name="org.jpox.autoCreateSchema" value="false"/>
+        <property name="org.jpox.autoCreateTables" value="false"/>
+        <property name="org.jpox.autoCreateConstraints" value="false"/>
+        <property name="org.jpox.autoCreateColumns" value="false"/>
+        <property name="org.jpox.rdbms.CheckExistTablesOrViews" value="false"/>
+        <property name="org.jpox.autoStartMechanism" value="None"/>
+        <property name="org.jpox.connectionPoolingType" value="C3P0"/>
+        <property name="org.jpox.implementationCreatorName" value="asm"/> 
+        
+        <instance-lifecycle-listener
+            listener="listener.listener0"
+            classes="classes.classes0"
+        />
         
     </persistence-manager-factory>
-
+    
 </jdoconfig>
 

Modified: db/jdo/trunk/tck2/src/conf/pmf.conf
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/conf/pmf.conf?rev=628176&r1=628175&r2=628176&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/conf/pmf.conf (original)
+++ db/jdo/trunk/tck2/src/conf/pmf.conf Fri Feb 15 13:32:47 2008
@@ -47,4 +47,7 @@
 org.apache.jdo.tck.api.persistencemanagerfactory.SetNonTransactionalWrite \
 org.apache.jdo.tck.api.persistencemanagerfactory.SetOptimistic \
 org.apache.jdo.tck.api.persistencemanagerfactory.SetRetainValues \
-org.apache.jdo.tck.api.persistencemanagerfactory.SupportedOptions
+org.apache.jdo.tck.api.persistencemanagerfactory.SupportedOptions \
+org.apache.jdo.tck.api.persistencemanagerfactory.config.Jdoconfig \
+org.apache.jdo.tck.api.persistencemanagerfactory.config.Persistence
+

Modified: db/jdo/trunk/tck2/src/conf/runonce.conf
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/conf/runonce.conf?rev=628176&r1=628175&r2=628176&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/conf/runonce.conf (original)
+++ db/jdo/trunk/tck2/src/conf/runonce.conf Fri Feb 15 13:32:47 2008
@@ -21,6 +21,4 @@
 # The runOnce flag must only be set in this configuration and no others
 runOnce = true
 jdo.tck.classes = \
-org.apache.jdo.tck.api.SignatureTest \
-org.apache.jdo.tck.api.persistencemanagerfactory.config.Jdoconfig \
-org.apache.jdo.tck.api.persistencemanagerfactory.config.Persistence
\ No newline at end of file
+org.apache.jdo.tck.api.SignatureTest 

Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/JDO_Test.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/JDO_Test.java?rev=628176&r1=628175&r2=628176&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/JDO_Test.java (original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/JDO_Test.java Fri Feb 15 13:32:47 2008
@@ -172,6 +172,11 @@
      */
     protected final String identitytype = System.getProperty("jdo.tck.identitytype");
 
+    /** 
+     * String indicating the name of the schema for the current test.
+     */
+    protected final String schemaname = System.getProperty("jdo.tck.schemaname");
+
     /** Name of the file containing the properties for the PMF. */
     protected static String PMFProperties = System.getProperty("PMFProperties");
 

Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/config/Jdoconfig.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/config/Jdoconfig.java?rev=628176&r1=628175&r2=628176&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/config/Jdoconfig.java
(original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/config/Jdoconfig.java
Fri Feb 15 13:32:47 2008
@@ -16,6 +16,7 @@
  */
 package org.apache.jdo.tck.api.persistencemanagerfactory.config;
 
+import java.util.HashMap;
 import javax.jdo.JDOHelper;
 import javax.jdo.PersistenceManager;
 import javax.jdo.PersistenceManagerFactory;
@@ -47,6 +48,7 @@
     // Do not use superclass pmf, pm
     private PersistenceManagerFactory pmf = null;
     private PersistenceManager pm = null;
+    private HashMap overrides = new HashMap();
 
     /**
      * The <code>main</code> is called when the class
@@ -56,32 +58,41 @@
     public static void main(String[] args) {
         BatchTestRunner.run(Jdoconfig.class);
     }
+    
+        /**
+     * @see JDO_Test#localSetUp()
+     */
+    protected void localSetUp() {
+        if (isTestToBePerformed()) {
+            overrides.put("javax.jdo.mapping.Schema", schemaname);
+        }
+    }
 
     /** */
     public void testGetPMFNoArgs() {
         pmf = JDOHelper.getPersistenceManagerFactory();
-        runTest(ANONYMOUS_PMF_NAME);
+        checkIsOpen(ANONYMOUS_PMF_NAME);
     }
 
     /** */
     public void testGetPMFEmptyString() {
         String name = "";
         pmf = JDOHelper.getPersistenceManagerFactory(name);
-        runTest(ANONYMOUS_PMF_NAME);
+        checkIsOpen(ANONYMOUS_PMF_NAME);
     }
 
     /** */
     public void testGetPMFNull() {
         String name = null;
         pmf = JDOHelper.getPersistenceManagerFactory(name);
-        runTest(ANONYMOUS_PMF_NAME);
+        checkIsOpen(ANONYMOUS_PMF_NAME);
     }
 
     /** */
     public void testGetPMFStringSpace() {
         String name = " ";
         pmf = JDOHelper.getPersistenceManagerFactory(name);
-        runTest(ANONYMOUS_PMF_NAME);
+        checkIsOpen(ANONYMOUS_PMF_NAME);
     }
 
     /** */
@@ -90,31 +101,68 @@
         pmf = JDOHelper.getPersistenceManagerFactory(name);
         assertEquals("Incorrect value for RestoreValues",
                 pmf.getRestoreValues(), false);
-        runTest(name);
+        checkIsOpen(name);
+    }
+
+    /** */
+    public void testGetPMFEmptyStringOverrides() {
+        String name = "";
+        pmf = JDOHelper.getPersistenceManagerFactory(overrides, name);
+        checkPersistent(ANONYMOUS_PMF_NAME);
+    }
+
+    /** */
+    public void testGetPMFNullOverrides() {
+        String name = null;
+        pmf = JDOHelper.getPersistenceManagerFactory(overrides, name);
+        checkPersistent(ANONYMOUS_PMF_NAME);
+    }
+
+    /** */
+    public void testGetPMFStringSpaceOverrides() {
+        String name = " ";
+        pmf = JDOHelper.getPersistenceManagerFactory(overrides, name);
+        checkPersistent(ANONYMOUS_PMF_NAME);
     }
 
     /** */
-    public void testGetPMFNamedSpaces() {
+    public void testGetPMFNamedOverrides() {
+        String name = "namedPMF0";
+        pmf = JDOHelper.getPersistenceManagerFactory(overrides, name);
+        assertEquals("Incorrect value for RestoreValues",
+                pmf.getRestoreValues(), false);
+        checkPersistent(name);
+    }
+
+    /** */
+    public void testGetPMFNamedSpacesOverrides() {
         String name = "namedPMF1";
-        pmf = JDOHelper.getPersistenceManagerFactory(" \t" + name + " \n");
+        pmf = JDOHelper.getPersistenceManagerFactory(overrides,
+                " \t" + name + " \n");
         assertEquals("Incorrect value for RestoreValues",
                 pmf.getRestoreValues(), true);
-        runTest(name);
+        checkPersistent(name);
     }
 
     /** */
-    public void runTest(String name) {
+    public void checkIsOpen(String name) {
         assertEquals("Incorrect PMF name", pmf.getName(), name);
-
-        // check pmf.isClosed() before and after pmf.close()
         if (pmf.isClosed()) {
             fail(ASSERTION_FAILED,
                     "PMF.isClosed() returned true on an open pmf");
         }
+        pmf.close();
+        // have next invocation of getPMF() get a new pmf
+        pmf = null;
+    }
+
+    /** */
+    public void checkPersistent(String name) {
+        assertEquals("Incorrect PMF name", pmf.getName(), name);
+
         makePersistent();
 
         pmf.close();
-
         if (!pmf.isClosed()) {
             fail(ASSERTION_FAILED,
                     "PMF.isClosed() returned false on a closed pmf");



Mime
View raw message