continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ri...@apache.org
Subject svn commit: r597964 - in /maven/continuum/branches/continuum-jpa/continuum-model-jpa: pom.xml src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java src/test/resources/META-INF/persistence.xml
Date Sun, 25 Nov 2007 08:56:38 GMT
Author: rinku
Date: Sun Nov 25 00:56:38 2007
New Revision: 597964

URL: http://svn.apache.org/viewvc?rev=597964&view=rev
Log:
o  bumped up OpenJPA version to latest release.
o  switched to HSQLDB as it supports in-memory mode for unit testing. 
o  related changes to OpenJPA config for unit tests.

Modified:
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/pom.xml
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/persistence.xml

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/pom.xml?rev=597964&r1=597963&r2=597964&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/pom.xml (original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/pom.xml Sun Nov 25 00:56:38
2007
@@ -18,43 +18,13 @@
     <dependency>
       <groupId>org.apache.openjpa</groupId>
       <artifactId>openjpa</artifactId>
-      <version>1.0.0</version>
+      <version>1.0.1</version>
     </dependency>
     <dependency>
-      <groupId>org.apache.derby</groupId>
-      <artifactId>derby</artifactId>
-      <version>10.3.1.4</version>
+      <groupId>hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <version>1.8.0.7</version>
       <scope>test</scope>
     </dependency>
-  </dependencies>
-  <!-- build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>process-sources</phase>
-            <configuration>
-              <tasks>                  
-                <property name="compile_classpath"
-                  refid="maven.compile.classpath" />
-                <property name="runtime_classpath"
-                  refid="maven.runtime.classpath" />
-                <property name="test_classpath"
-                  refid="maven.test.classpath" />
-                <property name="plugin_classpath"
-                  refid="maven.plugin.classpath" />
-                <ant antfile="${basedir}/build.xml">
-                  <target name="refresh" />
-                </ant>
-              </tasks>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build -->
+  </dependencies>  
 </project>

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java?rev=597964&r1=597963&r2=597964&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java
Sun Nov 25 00:56:38 2007
@@ -13,7 +13,10 @@
  * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
  * @since 1.2
  * @version $Id$
- * @see {@linkplain http://mail-archives.apache.org/mod_mbox/openjpa-users/200706.mbox/%3CBF2B99E3-7EF3-4E99-91E1-8AEB940524C7@apache.org%3E}
+ * @see <a
+ *      href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200706.mbox/%3CBF2B99E3-7EF3-4E99-91E1-8AEB940524C7@apache.org%3E">
+ *      http://mail-archives.apache.org/mod_mbox/openjpa-users/200706.mbox/%3CBF2B99E3-7EF3-4E99-91E1-8AEB940524C7@apache.org%3E
+ *      </a>
  */
 public class JpaProjectStoreTest extends SingleEMTestCase
 {
@@ -42,9 +45,9 @@
         assertEquals( 1, sql.length );
         assertTrue( sql[0].startsWith( "SELECT" ) );
         // TODO: Uncomment following!
-        //List results = q.getResultList();
-        //assertNotNull( results );
-        //assertEquals( 0, results.size() );
+        List results = q.getResultList();
+        assertNotNull( results );
+        assertEquals( 0, results.size() );
     }
 
     /**

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/persistence.xml?rev=597964&r1=597963&r2=597964&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/persistence.xml
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/persistence.xml
Sun Nov 25 00:56:38 2007
@@ -34,10 +34,20 @@
     <class>org.apache.maven.continuum.model.system.SystemConfiguration</class>
     
     <properties>
-      <property name="openjpa.ConnectionURL" value="jdbc:derby:target/database/continuum_jpa;create=true"/>
-      <property name="openjpa.ConnectionDriverName" value="org.apache.derby.jdbc.EmbeddedDriver"/>
+      <property name="openjpa.jdbc.DBDictionary" value="hsql" />
+      <property name="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:continuum_jpa;create=true,autoCommit=true"/>
+      <property name="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver"/>
       <property name="openjpa.ConnectionUserName" value="sa"/>
       <property name="openjpa.ConnectionPassword" value=""/>
+      <!--  Configure OpenJPA to automatically run the mapping tool at runtime and create
schema on Unit Test setup -->
+      <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>

+      
+      <!-- Enable SQL logging in OpenJPA -->
+      <property name="openjpa.Log" value="DefaultLevel=INFO,SQL=TRACE"/>
+      
+      <!-- Change default log level across OpenJPA 
+      <property name="openjpa.Log" value="DefaultLevel=TRACE"/>
+      -->
     </properties>
     
   </persistence-unit>



Mime
View raw message