List:Commits« Previous MessageNext Message »
From:Craig L Russell Date:March 11 2011 1:54am
Subject:bzr push into mysql-5.1-telco-7.1 branch (Craig.Russell:4125 to 4126)
View as plain text  
 4126 Craig L Russell	2011-03-10
      Update openjpa test framework for latest maven surefire plugin

    modified:
      storage/ndb/clusterj/clusterj-jpatest/src/main/java/com/mysql/clusterj/jpatest/PersistenceTestCase.java
 4125 Craig L Russell	2011-03-10
      Clean up pom.xml with dependency and plugin management

    modified:
      storage/ndb/clusterj/clusterj-api/pom.xml
      storage/ndb/clusterj/clusterj-bindings/pom.xml
      storage/ndb/clusterj/clusterj-core/pom.xml
      storage/ndb/clusterj/clusterj-jdbc/pom.xml
      storage/ndb/clusterj/clusterj-jpatest/pom.xml
      storage/ndb/clusterj/clusterj-openjpa/pom.xml
      storage/ndb/clusterj/clusterj-test/pom.xml
      storage/ndb/clusterj/clusterj-tie/pom.xml
      storage/ndb/clusterj/pom.xml
=== modified file 'storage/ndb/clusterj/clusterj-jpatest/src/main/java/com/mysql/clusterj/jpatest/PersistenceTestCase.java'
--- a/storage/ndb/clusterj/clusterj-jpatest/src/main/java/com/mysql/clusterj/jpatest/PersistenceTestCase.java	2011-02-02 09:52:33 +0000
+++ b/storage/ndb/clusterj/clusterj-jpatest/src/main/java/com/mysql/clusterj/jpatest/PersistenceTestCase.java	2011-03-11 01:50:56 +0000
@@ -18,6 +18,7 @@
 
 package com.mysql.clusterj.jpatest;
 
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -54,7 +55,14 @@ public abstract class PersistenceTestCas
      * @param props configuration values in the form key, value, key, value...
      */
     protected EntityManagerFactory createEMF(Object... props) {
-        return createNamedEMF(getPersistenceUnitName(), props);
+        String puName = getPersistenceUnitName();
+        EntityManagerFactory result = createNamedEMF(puName, props);
+//        if (result == null) {
+//            System.out.println("Unable to create EMF with properties PUName " + puName + " props " + Arrays.toString(props));
+//        } else {
+//            System.out.println("Created EMF with properties PUName " + puName + " props " + Arrays.toString(props));
+//        }
+        return result;
     }
 
     /**
@@ -64,7 +72,7 @@ public abstract class PersistenceTestCas
     protected String getPersistenceUnitName() {
         String puName = System.getProperty(
                 "com.mysql.clusterj.jpa.PersistenceUnit", "ndb");
-        if (puName.equals("${com.mysql.clusterj.jpa.PersistenceUnit}")) {
+        if (puName.length() == 0 || puName.equals("${com.mysql.clusterj.jpa.PersistenceUnit}")) {
             return "ndb";
         } else {
             return puName;


Attachment: [text/bzr-bundle] bzr/craig.russell@oracle.com-20110311015056-4y7c69s87k6r05eb.bundle
Thread
bzr push into mysql-5.1-telco-7.1 branch (Craig.Russell:4125 to 4126)Craig L Russell11 Mar