aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1691204 - in /aries/trunk/jpa/itests: ./ jpa-container-advancedtestbundle/ jpa-container-advancedtestbundle/src/main/java/org/apache/aries/jpa/container/advanced/itest/bundle/entities/ jpa-container-advancedtestbundle/src/main/resources/ME...
Date Wed, 15 Jul 2015 13:12:10 GMT
Author: cschneider
Date: Wed Jul 15 13:12:09 2015
New Revision: 1691204

URL: http://svn.apache.org/r1691204
Log:
[ARIES-1346] Refactored itests

Added:
    aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerEclipseLinkTest.java
      - copied, changed from r1691154, aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/advanced/features/itest/EclipseLinkWeavingAndAnnotationScanningTest.java
    aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerOpenJPATest.java
      - copied, changed from r1691154, aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/advanced/features/itest/OpenjpaWeavingAndAnnotationScanningTest.java
    aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerTest.java
Removed:
    aries/trunk/jpa/itests/jpa-container-advancedtestbundle/.gitignore
    aries/trunk/jpa/itests/jpa-container-advancedtestbundle/LICENSE
    aries/trunk/jpa/itests/jpa-container-advancedtestbundle/NOTICE
    aries/trunk/jpa/itests/jpa-container-advancedtestbundle/pom.xml
    aries/trunk/jpa/itests/jpa-container-advancedtestbundle/src/main/java/org/apache/aries/jpa/container/advanced/itest/bundle/entities/Car.java
    aries/trunk/jpa/itests/jpa-container-advancedtestbundle/src/main/java/org/apache/aries/jpa/container/advanced/itest/bundle/entities/packageinfo
    aries/trunk/jpa/itests/jpa-container-advancedtestbundle/src/main/resources/META-INF/persistence.xml
    aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/advanced/features/itest/EclipseLinkWeavingAndAnnotationScanningTest.java
    aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/advanced/features/itest/JPAWeavingAndAnnotationScanningTest.java
    aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/advanced/features/itest/OpenjpaWeavingAndAnnotationScanningTest.java
    aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/EMFBuilderTest.java
    aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerDataSourceFactoryTest.java
    aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/OpenJPAContainerTest.java
    aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/context/itest/EclipseLinkEmSupplierTest.java
    aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/context/itest/EmSupplierTest.java
    aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/context/itest/OpenjpaEmSupplierTest.java
Modified:
    aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerHibernateTest.java
    aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/itest/AbstractJPAItest.java
    aries/trunk/jpa/itests/jpa-container-testbundle/src/main/resources/META-INF/persistence.xml
    aries/trunk/jpa/itests/pom.xml

Copied: aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerEclipseLinkTest.java
(from r1691154, aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/advanced/features/itest/EclipseLinkWeavingAndAnnotationScanningTest.java)
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerEclipseLinkTest.java?p2=aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerEclipseLinkTest.java&p1=aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/advanced/features/itest/EclipseLinkWeavingAndAnnotationScanningTest.java&r1=1691154&r2=1691204&rev=1691204&view=diff
==============================================================================
--- aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/advanced/features/itest/EclipseLinkWeavingAndAnnotationScanningTest.java
(original)
+++ aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerEclipseLinkTest.java
Wed Jul 15 13:12:09 2015
@@ -13,7 +13,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.aries.jpa.advanced.features.itest;
+package org.apache.aries.jpa.container.itest;
 
 import static org.junit.Assert.assertTrue;
 
@@ -25,7 +25,8 @@ import org.junit.Test;
 import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
 
-public class EclipseLinkWeavingAndAnnotationScanningTest extends JPAWeavingAndAnnotationScanningTest
{
+public class JPAContainerEclipseLinkTest extends JPAContainerTest {
+
     @Configuration
     public Option[] eclipseLinkConfig() {
         return new Option[] {
@@ -42,5 +43,4 @@ public class EclipseLinkWeavingAndAnnota
         assertTrue("Not PersistenceCapable",
                    Arrays.asList(Car.class.getInterfaces()).contains(PersistenceWeaved.class));
     }
-
 }

Modified: aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerHibernateTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerHibernateTest.java?rev=1691204&r1=1691203&r2=1691204&view=diff
==============================================================================
--- aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerHibernateTest.java
(original)
+++ aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerHibernateTest.java
Wed Jul 15 13:12:09 2015
@@ -15,34 +15,10 @@
  */
 package org.apache.aries.jpa.container.itest;
 
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-
-import org.apache.aries.jpa.container.itest.entities.Car;
-import org.apache.aries.jpa.itest.AbstractJPAItest;
-import org.junit.Test;
 import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
 
-public class JPAContainerHibernateTest extends AbstractJPAItest {
-    @Test
-    public void testCarCreateDelete() throws Exception {
-        EntityManagerFactory emf = getEMF(TEST_UNIT);
-        resolveBundles();
-        EntityManager em = emf.createEntityManager();
-        em.getTransaction().begin();
-        Car car = createBlueCar();
-        em.persist(car);
-        em.getTransaction().commit();
-        em.close();
-
-        em = emf.createEntityManager();
-        em.getTransaction().begin();
-        car = em.merge(car);
-        em.remove(car);
-        em.getTransaction().commit();
-        em.close();
-    }
+public class JPAContainerHibernateTest extends JPAContainerTest {
 
     @Configuration
     public Option[] configuration() {

Copied: aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerOpenJPATest.java
(from r1691154, aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/advanced/features/itest/OpenjpaWeavingAndAnnotationScanningTest.java)
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerOpenJPATest.java?p2=aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerOpenJPATest.java&p1=aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/advanced/features/itest/OpenjpaWeavingAndAnnotationScanningTest.java&r1=1691154&r2=1691204&rev=1691204&view=diff
==============================================================================
--- aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/advanced/features/itest/OpenjpaWeavingAndAnnotationScanningTest.java
(original)
+++ aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerOpenJPATest.java
Wed Jul 15 13:12:09 2015
@@ -13,7 +13,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.aries.jpa.advanced.features.itest;
+package org.apache.aries.jpa.container.itest;
 
 import static org.junit.Assert.assertTrue;
 
@@ -25,23 +25,24 @@ import org.junit.Test;
 import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
 
-public class OpenjpaWeavingAndAnnotationScanningTest extends JPAWeavingAndAnnotationScanningTest
{
+public class JPAContainerOpenJPATest extends JPAContainerTest {
+    
+    @Test
+    public void testClassIsWoven() throws Exception {
+        assertTrue("Not PersistenceCapable",
+                   Arrays.asList(Car.class.getInterfaces()).contains(PersistenceCapable.class));
+    }
 
     @Configuration
-    public Option[] openjpaConfig() {
+    public Option[] configuration() {
         return new Option[] {
             baseOptions(), //
-            openJpa(), //
             ariesJpa20(), //
+            openJpa(), //
             derbyDSF(), //
-            testBundle(), //
+            testBundle()
         };
-    }
 
-    @Test
-    public void testClassIsWoven() throws Exception {
-        assertTrue("Not PersistenceCapable",
-                   Arrays.asList(Car.class.getInterfaces()).contains(PersistenceCapable.class));
     }
 
 }

Added: aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerTest.java?rev=1691204&view=auto
==============================================================================
--- aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerTest.java
(added)
+++ aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerTest.java
Wed Jul 15 13:12:09 2015
@@ -0,0 +1,123 @@
+package org.apache.aries.jpa.container.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.Query;
+import javax.persistence.TypedQuery;
+
+import org.apache.aries.jpa.container.itest.entities.Car;
+import org.apache.aries.jpa.itest.AbstractJPAItest;
+import org.apache.aries.jpa.supplier.EmSupplier;
+import org.junit.Test;
+import org.osgi.service.jpa.EntityManagerFactoryBuilder;
+
+public abstract class JPAContainerTest extends AbstractJPAItest {
+
+    @Test
+    public void testCarEMFBuilder() throws Exception {
+        EntityManagerFactoryBuilder emfBuilder = getService(EntityManagerFactoryBuilder.class,
+                                                            "(osgi.unit.name=" + DSF_TEST_UNIT
+ ")");
+        Map<String, Object> props = new HashMap<String, Object>();
+        EntityManagerFactory emf = emfBuilder.createEntityManagerFactory(props);
+        carLifecycleRL(emf.createEntityManager());
+    }
+
+    @Test
+    public void testCarEMF() throws Exception {
+        carLifecycleRL(getEMF(TEST_UNIT).createEntityManager());
+    }
+    
+    @Test
+    public void testEMFXA() throws Exception {
+        EntityManager em = getEMF(XA_TEST_UNIT).createEntityManager();
+        carLifecycleXA(ut, em);
+        em.close();
+    }
+
+    @Test
+    public void testDataSourceFactoryLifecycle() throws Exception {
+        carLifecycleRL(getEMF(DSF_TEST_UNIT).createEntityManager());
+    }
+
+    @Test
+    public void testDataSourceFactoryXALifecycle() throws Exception {
+        EntityManager em = getEMF(DSF_XA_TEST_UNIT).createEntityManager();
+        carLifecycleXA(ut, em);
+        em.close();
+    }
+    
+
+    @Test
+    public void testEmSupplier() throws Exception {
+        EmSupplier emSupplier = getService(EmSupplier.class, "(osgi.unit.name=xa-test-unit)");
+        emSupplier.preCall();
+        EntityManager em = emSupplier.get();
+        carLifecycleXA(ut, em);
+
+        Query countQuery = em.createQuery("SELECT Count(c) from Car c");
+        assertEquals(0l, countQuery.getSingleResult());
+
+        ut.begin();
+        em.joinTransaction();
+        em.persist(createBlueCar());
+        em.persist(createGreenCar());
+        ut.commit();
+
+        assertEquals(2l, countQuery.getSingleResult());
+
+        TypedQuery<Car> carQuery = em.createQuery("Select c from Car c ORDER by c.engineSize",
Car.class);
+        List<Car> list = carQuery.getResultList();
+        assertEquals(2, list.size());
+
+        assertBlueCar(list.get(0));
+        assertGreenCar(list.get(1));
+
+        ut.begin();
+        em.joinTransaction();
+        Car car = em.find(Car.class, BLUE_CAR_PLATE);
+        car.setNumberOfSeats(2);
+        car.setEngineSize(2000);
+        car.setColour("red");
+        em.remove(em.find(Car.class, GREEN_CAR_PLATE));
+        em.persist(createBlackCar());
+        ut.commit();
+
+        assertEquals(2l, countQuery.getSingleResult());
+
+        list = carQuery.getResultList();
+        assertEquals(2, list.size());
+
+        assertEquals(2, list.get(0).getNumberOfSeats());
+        assertEquals(800, list.get(0).getEngineSize());
+        assertEquals("black", list.get(0).getColour());
+        assertEquals("C3CCC", list.get(0).getNumberPlate());
+
+        assertEquals(2, list.get(1).getNumberOfSeats());
+        assertEquals(2000, list.get(1).getEngineSize());
+        assertEquals("red", list.get(1).getColour());
+        assertEquals("A1AAA", list.get(1).getNumberPlate());
+        
+        ut.begin();
+        em.joinTransaction();
+        delete(em, "C3CCC");
+        delete(em, "A1AAA");
+        ut.commit();
+        emSupplier.postCall();
+    }
+
+    private Car createBlackCar() {
+        Car car;
+        car = new Car();
+        car.setNumberOfSeats(2);
+        car.setEngineSize(800);
+        car.setColour("black");
+        car.setNumberPlate("C3CCC");
+        return car;
+    }
+}

Modified: aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/itest/AbstractJPAItest.java
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/itest/AbstractJPAItest.java?rev=1691204&r1=1691203&r2=1691204&view=diff
==============================================================================
--- aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/itest/AbstractJPAItest.java
(original)
+++ aries/trunk/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/itest/AbstractJPAItest.java
Wed Jul 15 13:12:09 2015
@@ -14,7 +14,9 @@ import java.util.Dictionary;
 import java.util.Hashtable;
 
 import javax.inject.Inject;
+import javax.persistence.EntityManager;
 import javax.persistence.EntityManagerFactory;
+import javax.transaction.UserTransaction;
 
 import org.apache.aries.jpa.container.itest.entities.Car;
 import org.junit.Before;
@@ -43,15 +45,22 @@ import org.slf4j.LoggerFactory;
 @ExamReactorStrategy(PerClass.class)
 public abstract class AbstractJPAItest {
     private static Logger LOG = LoggerFactory.getLogger(AbstractJPAItest.class);
-    protected static final String BLUE_CAR_PLATE = "A1AAA";
+
     protected static final String TEST_UNIT = "test-unit";
     protected static final String XA_TEST_UNIT = "xa-test-unit";
-    protected static final String BP_TEST_UNIT = "bp-test-unit";
-    protected static final String BP_XA_TEST_UNIT = "bp-xa-test-unit";
+    protected static final String DSF_TEST_UNIT = "dsf-test-unit";
+    protected static final String DSF_XA_TEST_UNIT = "dsf-xa-test-unit";
+
     protected static final String TEST_BUNDLE_NAME = "org.apache.aries.jpa.org.apache.aries.jpa.container.itest.bundle";
+    
+    protected static final String BLUE_CAR_PLATE = "A1AAA";
+    protected static final String GREEN_CAR_PLATE = "B2BBB";
 
     @Inject
     protected BundleContext bundleContext;
+    
+    @Inject
+    protected UserTransaction ut;
 
     @Inject
     protected ConfigurationAdmin configAdmin;
@@ -305,7 +314,7 @@ public abstract class AbstractJPAItest {
         car.setNumberOfSeats(7);
         car.setEngineSize(1800);
         car.setColour("green");
-        car.setNumberPlate("B2BBB");
+        car.setNumberPlate(GREEN_CAR_PLATE);
         return car;
     }
 
@@ -320,6 +329,55 @@ public abstract class AbstractJPAItest {
         assertEquals(7, car.getNumberOfSeats());
         assertEquals(1800, car.getEngineSize());
         assertEquals("green", car.getColour());
-        assertEquals("B2BBB", car.getNumberPlate());
+        assertEquals(GREEN_CAR_PLATE, car.getNumberPlate());
     }
+    
+    /**
+     * Create, find and delete car using resource local transactions
+     * @param emf
+     * @throws BundleException
+     */
+    protected void carLifecycleRL(EntityManager em) throws BundleException {
+        em.getTransaction().begin();
+        Car car = createBlueCar();
+        em.persist(car);
+        em.getTransaction().commit();
+
+        Car car2 = em.find(Car.class, BLUE_CAR_PLATE);
+        assertBlueCar(car2);
+        em.getTransaction().begin();
+        em.remove(car2);
+        em.getTransaction().commit();
+        em.close();
+    }
+
+    /**
+     * Create, find and delete car using XA Transactions
+     * @param ut
+     * @param em
+     * @throws Exception
+     */
+    protected void carLifecycleXA(UserTransaction ut, EntityManager em) throws Exception
{
+        ut.begin();
+        em.joinTransaction();
+        delete(em, BLUE_CAR_PLATE);
+        em.persist(createBlueCar());
+        ut.commit();
+
+        Car c = em.find(Car.class, BLUE_CAR_PLATE);
+        assertBlueCar(c);
+
+        ut.begin();
+        em.joinTransaction();
+        delete(em, BLUE_CAR_PLATE);
+        ut.commit();
+    }
+
+    protected void delete(EntityManager em, String plateId) {
+        Car car = em.find(Car.class, plateId);
+        if (car != null) {
+            em.remove(car);
+        }
+    }
+
 }

Modified: aries/trunk/jpa/itests/jpa-container-testbundle/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/itests/jpa-container-testbundle/src/main/resources/META-INF/persistence.xml?rev=1691204&r1=1691203&r2=1691204&view=diff
==============================================================================
--- aries/trunk/jpa/itests/jpa-container-testbundle/src/main/resources/META-INF/persistence.xml
(original)
+++ aries/trunk/jpa/itests/jpa-container-testbundle/src/main/resources/META-INF/persistence.xml
Wed Jul 15 13:12:09 2015
@@ -35,29 +35,24 @@
         <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
         <property name="openjpa.jdbc.DBDictionary" value="derby"/>
 
+        <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
         <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyTenSevenDialect"/>
         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
     </properties>
   </persistence-unit>
   
    <persistence-unit name="xa-test-unit" transaction-type="JTA">
-        <description>Test persistence unit for the JPA Container advanced iTests</description>
-        <properties>
-            <property name="javax.persistence.jdbc.driver"
-                value="org.apache.derby.jdbc.EmbeddedDriver-pool-xa" />
-            <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:TEST;create=true"
/>
-
-            <!-- These properties are creating the database on the fly. We 
-                are using them to avoid the tests having to create a database -->
-
-            <property name="openjpa.jdbc.SynchronizeMappings"
-                value="buildSchema(ForeignKeys=true)" />
-            <property name="openjpa.jdbc.DBDictionary" value="derby" />
-
-            <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
-            <property name="hibernate.dialect"
-                value="org.hibernate.dialect.DerbyTenSevenDialect" />
-    <!--         <property name="hibernate.hbm2ddl.auto" value="create-drop" />
-->
+     <description>Test persistence unit for the JPA Container advanced iTests</description>
+     <properties>
+       <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver-pool-xa"
/>
+       <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:XATEST;create=true"
/>
+
+        <!-- These properties are creating the database on the fly. We are using them
to avoid the tests having to create a database -->
+        <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"
/>
+        <property name="openjpa.jdbc.DBDictionary" value="derby" />
+        <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
+        <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyTenSevenDialect"
/>
+        <property name="hibernate.hbm2ddl.auto" value="create-drop" />
         </properties>
     </persistence-unit>
 
@@ -67,9 +62,11 @@
         <!-- These properties are creating the database on the fly. We are using them
to avoid the tests having
           to create a database  -->
         <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
-        <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:TEST2;create=true"/>
+        <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:DSFTEST;create=true"/>
+
         <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
         <property name="openjpa.jdbc.DBDictionary" value="derby"/>
+        <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
         <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyTenSevenDialect"/>
         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
     </properties>
@@ -78,36 +75,30 @@
   <persistence-unit name="dsf-xa-test-unit" transaction-type="JTA">
     <description>Test persistence unit for the JPA Container DataSourceFactory iTests</description>
     <properties>
-     <!-- These properties are creating the database on the fly. We are using them to
avoid the tests having
-          to create a database  -->
-        <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver-pool-xa"/>
-        <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:TEST3;create=true"/>
-        <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
-        <property name="openjpa.jdbc.DBDictionary" value="derby"/>
-        <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyTenSevenDialect"/>
-        <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+      <!-- These properties are creating the database on the fly. We are using them to
avoid the tests having to create a database  -->     <property name="javax.persistence.jdbc.driver"
value="org.apache.derby.jdbc.EmbeddedDriver-pool-xa"/>
+      <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:DSFXATEST;create=true"/>
+
+      <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
+      <property name="openjpa.jdbc.DBDictionary" value="derby"/>
+      <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
+      <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyTenSevenDialect"/>
+      <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
     </properties>
   </persistence-unit>
   
-    <persistence-unit name="test_unit_blueprint" transaction-type="JTA">
-        <description>Test persistence unit for the Blueprint test</description>
+  <persistence-unit name="test_unit_blueprint" transaction-type="JTA">
+    <description>Test persistence unit for the Blueprint test</description>
 
-        <properties>
-            <property name="javax.persistence.jdbc.driver"
-                value="org.apache.derby.jdbc.EmbeddedDriver-pool-xa" />
-            <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:TESTBLUEPRINT;create=true"
/>
-
-            <!-- These properties are creating the database on the fly. We 
-                are using them to avoid the tests having to create a database -->
-
-            <property name="openjpa.jdbc.SynchronizeMappings"
-                value="buildSchema(ForeignKeys=true)" />
-            <property name="openjpa.jdbc.DBDictionary" value="derby" />
-
-            <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
-            <property name="hibernate.dialect"
-                value="org.hibernate.dialect.DerbyTenSevenDialect" />
-            <property name="hibernate.hbm2ddl.auto" value="create-drop" />
-        </properties>
-    </persistence-unit>
+    <properties>
+      <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver-pool-xa"
/>
+      <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:BLUEPRINTTEST;create=true"
/>
+
+      <!-- These properties are creating the database on the fly. We are using them to
avoid the tests having to create a database -->
+      <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"
/>
+      <property name="openjpa.jdbc.DBDictionary" value="derby" />
+      <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
+      <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyTenSevenDialect"
/>
+      <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+    </properties>
+  </persistence-unit>
 </persistence>

Modified: aries/trunk/jpa/itests/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/itests/pom.xml?rev=1691204&r1=1691203&r2=1691204&view=diff
==============================================================================
--- aries/trunk/jpa/itests/pom.xml (original)
+++ aries/trunk/jpa/itests/pom.xml Wed Jul 15 13:12:09 2015
@@ -33,7 +33,6 @@
 
     <modules>
         <module>jpa-container-blueprint-testbundle</module>
-        <module>jpa-container-advancedtestbundle</module>
         <module>jpa-container-itest</module>
         <module>jpa-container-testbundle</module>
         <module>jpa-container-testbundle-eclipselink</module>



Mime
View raw message