db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r632559 - in /db/jdo/trunk/tck2/src: conf/jdori-persistence.xml java/org/apache/jdo/tck/api/persistencemanagerfactory/config/Persistence.java
Date Sat, 01 Mar 2008 07:15:11 GMT
Author: clr
Date: Fri Feb 29 23:15:10 2008
New Revision: 632559

URL: http://svn.apache.org/viewvc?rev=632559&view=rev
Log:
JDO-576 changed tests to use schema based on application or datastore identity

Modified:
    db/jdo/trunk/tck2/src/conf/jdori-persistence.xml
    db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/config/Persistence.java

Modified: db/jdo/trunk/tck2/src/conf/jdori-persistence.xml
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/conf/jdori-persistence.xml?rev=632559&r1=632558&r2=632559&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/conf/jdori-persistence.xml (original)
+++ db/jdo/trunk/tck2/src/conf/jdori-persistence.xml Fri Feb 29 23:15:10 2008
@@ -71,6 +71,40 @@
     </properties>
 </persistence-unit>
 
+<persistence-unit name="datastoreidentity0" transaction-type="RESOURCE_LOCAL">
+    <!--
+            The default provider can be OpenJPA, or some other product.
+            This element is optional if OpenJPA is the only JPA provider
+            in the current classloading environment, but can be specified
+            in cases where there are multiple JPA implementations available.
+        -->
+    
+    <properties>
+    <property name="javax.jdo.option.ConnectionDriverName"
+              value="org.apache.derby.jdbc.EmbeddedDriver"/>
+    <property name="javax.jdo.option.ConnectionURL" value="jdbc:derby:jdotckdb"/>
+    <property name="javax.jdo.option.ConnectionUserName" value="tckuser"/>
+    <property name="javax.jdo.option.ConnectionPassword" value="tckuser"/>
+    <property name="javax.jdo.option.Optimistic" value="false"/>
+    <property name="javax.jdo.option.RestoreValues" value="false"/>
+    <property name="javax.jdo.option.RetainValues" value="false"/>
+    <property name="javax.jdo.option.Mapping" value="derby"/>
+    <property name="javax.jdo.mapping.Schema" value="datastoreidentity0"/> 
+    <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"/>
+    </properties>
+</persistence-unit>
+
 <!-- persistence unit for the "relations" example -->
 <persistence-unit name="relations" transaction-type="RESOURCE_LOCAL">
     <class>relations.Deity</class>

Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/config/Persistence.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/config/Persistence.java?rev=632559&r1=632558&r2=632559&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/config/Persistence.java
(original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/config/Persistence.java
Fri Feb 29 23:15:10 2008
@@ -60,25 +60,26 @@
 
     /** */
     public void testGetPMFfromEMFNamed() {
-        String name = "applicationidentity0";
+        String name = identitytype + "0";
         pmf = JDOHelper.getPersistenceManagerFactory(name);
         assertEquals("Incorrect value for RestoreValues",
-                pmf.getRestoreValues(), false);
+                false, pmf.getRestoreValues());
         runTest(name);
     }
 
     /** */
     public void testGetPMFfromEMFNamedSpaces() {
-        String name = "applicationidentity0";
+        String name = identitytype + "0";
         pmf = JDOHelper.getPersistenceManagerFactory(" \t" + name + " \n");
         assertEquals("Incorrect value for RestoreValues",
-                pmf.getRestoreValues(), true);
+                false, pmf.getRestoreValues());
         runTest(name);
     }
 
     /** */
     public void runTest(String name) {
-        assertEquals("Incorrect PMF name", pmf.getName(), name);
+        String actualPUName = pmf.getPersistenceUnitName();
+        assertEquals("Incorrect PersistenceUnitName", name, actualPUName);
 
         // check pmf.isClosed() before and after pmf.close()
         if (pmf.isClosed()) {



Mime
View raw message