openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allee8...@apache.org
Subject svn commit: r1443246 - in /openjpa/trunk: ./ openjpa-integration/tck/ openjpa-integration/tck/sql/
Date Wed, 06 Feb 2013 22:30:10 GMT
Author: allee8285
Date: Wed Feb  6 22:30:09 2013
New Revision: 1443246

URL: http://svn.apache.org/viewvc?rev=1443246&view=rev
Log:
OPENJPA-2326 - Enable running TCK 2 against databases other then Derby. Fixed a few configuration
problems.

Added:
    openjpa/trunk/openjpa-integration/tck/sql/
    openjpa/trunk/openjpa-integration/tck/sql/create.openjpa.sql.xml   (with props)
    openjpa/trunk/openjpa-integration/tck/sql/db2.sql   (with props)
    openjpa/trunk/openjpa-integration/tck/sql/derby.sql   (with props)
Modified:
    openjpa/trunk/openjpa-integration/tck/pom.xml
    openjpa/trunk/openjpa-integration/tck/tck2-20110815.xml
    openjpa/trunk/pom.xml

Modified: openjpa/trunk/openjpa-integration/tck/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/tck/pom.xml?rev=1443246&r1=1443245&r2=1443246&view=diff
==============================================================================
--- openjpa/trunk/openjpa-integration/tck/pom.xml (original)
+++ openjpa/trunk/openjpa-integration/tck/pom.xml Wed Feb  6 22:30:09 2013
@@ -185,12 +185,22 @@
                         <path id="cp">
                             <path refid="maven.compile.classpath" />
                         </path>
+                        <path id="cp.test">
+                            <pathelement location="${basedir}/../../target/classes"/>
+                            <path refid="maven.test.classpath" />
+                        </path>
+                        <pathconvert property="cp.test.classpath" refid="cp.test" />
                         
                         <!-- create missing directory for maven compile classpath -->
                         <mkdir dir="${basedir}/target/classes" />
                         
                         <ant antfile="${basedir}/tck2-${tck2.level}.xml" inheritRefs="true">
                             <target name="run-tck" />
+                            <property name="tck.db.name" value="${tck.db.name}" />
+                            <property name="connection.driver.name" value="${connection.driver.name}"
/>
+                            <property name="connection.url" value="${connection.url}"
/>
+                            <property name="connection.username" value="${connection.username}"
/>
+                            <property name="connection.password" value="${connection.password}"
/>
                         </ant>
                     </tasks>
                   </configuration>
@@ -440,6 +450,89 @@ databaseName=${db.name}
           </dependency>
         </dependencies>
       </profile>
+
+        <profile>
+            <!--
+                Example db2 profile. You can use this profile if you:
+                1) have the DB2 artifacts installed in a local repo and supply the URL:
+                    -Ddb2.maven.repo=http://my.local.repo
+                2) have a copy of the DB2 JCC driver and run the following commands :
+                    mvn install:install-file -Dfile=${path to db2jcc.jar} \
+                                             -DgroupId=com.ibm.db2 \
+                                             -DartifactId=jcc-driver \
+                                             -Dversion=9.5 \
+                                             -Dpackaging=jar
+
+                    mvn install:install-file -Dfile=${path to db2jcc_license.jar} \
+                                             -DgroupId=com.ibm.db2 \
+                                             -DartifactId=jcc-license \
+                                             -Dversion=9.5 \
+                                             -Dpackaging=jar
+
+                You must also set the following properties:
+                    -Dopenjpa.db2.url=jdbc:db2://<HOST>:<PORT>/<DBNAME>
+                    -Dopenjpa.db2.username=<db2_uid>
+                    -Dopenjpa.db2.password=<db2_pwd>
+
+                Optionally, you can override the default DB2 groupId,
+                artifactIds and version by also supplying the following
+                properties:
+                    -Ddb2.groupid=com.ibm.db2
+                    -Dids.driver.artifactid=jcc-driver
+                    -Dids.license.artifactid=jcc-license
+                    -Ddb2.version=9.5
+            -->
+            <id>test-db2-jcc</id>
+            <activation>
+                <property>
+                    <name>test-db2-jcc</name>
+                </property>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>${db2.groupid}</groupId>
+                    <artifactId>${db2.driver.artifactid}</artifactId>
+                    <version>${db2.version}</version>
+                    <scope>test</scope>
+                </dependency>
+                <dependency>
+                    <groupId>${db2.groupid}</groupId>
+                    <artifactId>${db2.license.artifactid}</artifactId>
+                    <version>${db2.version}</version>
+                    <scope>test</scope>
+                </dependency>
+            </dependencies>
+            <properties>
+                <db2.maven.repo>http://not.a.real.repository</db2.maven.repo>
+                <db2.groupid>com.ibm.db2</db2.groupid>
+                <db2.driver.artifactid>jcc-driver</db2.driver.artifactid>
+                <db2.license.artifactid>jcc-license</db2.license.artifactid>
+                <db2.version>9.5</db2.version>
+                <connection.driver.name>com.ibm.db2.jcc.DB2Driver</connection.driver.name>
+                <connection.url>jdbc:db2://localhost:50000/tck</connection.url>
+                <connection.url>${openjpa.db2.url}</connection.url>
+                <connection.username>${openjpa.db2.username}</connection.username>
+                <connection.password>${openjpa.db2.password}</connection.password>
+                <jdbc.DBDictionary />
+                <tck.db.name>db2</tck.db.name>
+            </properties>
+            <repositories>
+                <repository>
+                    <id>db2.repository</id>
+                    <name>DB2 Repository</name>
+                    <url>${db2.maven.repo}</url>
+                    <layout>default</layout>
+                    <snapshots>
+                        <enabled>false</enabled>
+                    </snapshots>
+                    <releases>
+                        <enabled>true</enabled>
+                        <checksumPolicy>ignore</checksumPolicy>
+                    </releases>
+                </repository>
+            </repositories>
+        </profile>
+
     </profiles>
 
     <dependencies>

Added: openjpa/trunk/openjpa-integration/tck/sql/create.openjpa.sql.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/tck/sql/create.openjpa.sql.xml?rev=1443246&view=auto
==============================================================================
--- openjpa/trunk/openjpa-integration/tck/sql/create.openjpa.sql.xml (added)
+++ openjpa/trunk/openjpa-integration/tck/sql/create.openjpa.sql.xml Wed Feb  6 22:30:09 2013
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project name="ExecSQL" default="create-sql" basedir=".">
+
+    <target name="create-sql">
+    
+        <echo>Creating OpenJPA specific sql for JPA 2.0 TCK tests</echo>
+        <!-- Use tsant force to change the working directory to @{dir}. -->
+        <tsant dir="${tck.dir}/bin" buildfile="${basedir}/sql/create.openjpa.sql.xml"
target="exec-sql"/>
+        <echo>Create TCK specific database tables returned result=${tsant.result}</echo>
+        
+    </target>
+
+    <target name="exec-sql">
+    
+        <echo>databaseName=${databaseName}</echo>
+        <antcall target="init.${databaseName}"/>
+        
+    </target>
+
+    <target name="init.common">
+    
+        <sql driver="${database.driver}"
+             url="${database.url}"
+             userid="${database.user}"
+             password="${database.passwd}"
+             classpath="${jdbc.lib.classpath}"
+             delimiter="${db.delimiter}"
+             autocommit="true"
+             onerror="continue" >
+             <transaction src="../../../../sql/${databaseName}.sql"/>
+        </sql>
+        
+    </target>
+
+    <target name="init.derby">
+        <antcall target="init.common">
+            <param name="db.delimiter" value=";"/>
+        </antcall>
+    </target>
+
+    <target name="init.db2">
+        <antcall target="init.common">
+            <param name="db.delimiter" value="!"/>
+        </antcall>
+    </target>
+
+    <macrodef name="tsant">
+        <attribute name="dir" default="${tck.dir}/src" />
+        <attribute name="buildfile" />
+        <attribute name="target" />
+        <attribute name="tmo" default="7200000" />
+        <sequential>
+            <java classname="org.apache.tools.ant.launch.Launcher" fork="true" failonerror="false"
dir="@{dir}" append="true" output="${tck.log}" timeout="@{tmo}" resultproperty="tsant.result">
+                <arg value="-e" />
+                <arg value="-v" />
+                <arg value="-emacs" />
+                <arg value="-buildfile" />
+                <arg value="@{buildfile}" />
+                <arg value="-listener" />
+                <arg value="com.sun.ant.TSBuildListener" />
+                <arg value="-logger" />
+                <arg value="com.sun.ant.TSLogger" />
+                <arg value="@{target}" />
+
+                <env key="TS_HOME" value="${tck.dir}" />
+                <sysproperty key="ts.home" value="${tck.dir}" />
+
+                <env key="ANT_HOME" value="${tck.dir}/tools/ant" />
+                <sysproperty key="ant.home" value="${tck.dir}/tools/ant" />
+
+                <classpath>
+                    <path refid="cp" />
+                    <fileset dir="${tck.dir}/tools/ant/lib">
+                        <include name="**/*.jar" />
+                    </fileset>
+                    <fileset dir="${tck.dir}/lib">
+                        <include name="**/*.jar" />
+                    </fileset>
+                </classpath>
+            </java>
+        </sequential>
+    </macrodef>
+
+</project>

Propchange: openjpa/trunk/openjpa-integration/tck/sql/create.openjpa.sql.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-integration/tck/sql/db2.sql
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/tck/sql/db2.sql?rev=1443246&view=auto
==============================================================================
--- openjpa/trunk/openjpa-integration/tck/sql/db2.sql (added)
+++ openjpa/trunk/openjpa-integration/tck/sql/db2.sql Wed Feb  6 22:30:09 2013
@@ -0,0 +1,37 @@
+-- =======================================================================
+-- com.sun.ts.tests.ejb30.persistence.entitytest.cascadeall.oneXone
+DROP TABLE AEJB_1X1_BI_BTOB !
+CREATE TABLE AEJB_1X1_BI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER,
PRIMARY KEY (id)) !
+DROP TABLE BEJB_1X1_BI_BTOB !
+CREATE TABLE BEJB_1X1_BI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER,
FK_FOR_AEJB_1X1_BI_BTOB VARCHAR(255), PRIMARY KEY (id)) !
+CREATE INDEX I_BJ1X1B_BTB_A1 ON BEJB_1X1_BI_BTOB (FK_FOR_AEJB_1X1_BI_BTOB) !
+-- ALTER TABLE BEJB_1X1_BI_BTOB ADD CONSTRAINT FK_FOR_AEJB_1X1_BI FOREIGN KEY (FK_FOR_AEJB_1X1_BI_BTOB)
REFERENCES AEJB_1X1_BI_BTOB (ID) !
+
+-- =======================================================================
+-- com.sun.ts.tests.ejb30.persistence.entitytest.cascadeall.oneXmany
+DROP TABLE AEJB_1XM_BI_BTOB !
+CREATE TABLE AEJB_1XM_BI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER,
PRIMARY KEY (id)) !
+DROP TABLE BEJB_1XM_BI_BTOB !
+CREATE TABLE BEJB_1XM_BI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER,
FK_FOR_AEJB_1XM_BI_BTOB VARCHAR(255), PRIMARY KEY (id)) !
+CREATE INDEX I_BJ1XMTB_A1 ON BEJB_1XM_BI_BTOB (FK_FOR_AEJB_1XM_BI_BTOB) !
+-- ALTER TABLE BEJB_1XM_BI_BTOB ADD CONSTRAINT FK_FOR_AEJB_1XM_BI FOREIGN KEY (FK_FOR_AEJB_1XM_BI_BTOB)
REFERENCES AEJB_1XM_BI_BTOB (ID) !
+
+-- =======================================================================
+-- com.sun.ts.tests.ejb30.persistence.entitytest.cascadeall.manyXone
+DROP TABLE AEJB_MX1_UNI_BTOB !
+CREATE TABLE AEJB_MX1_UNI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER,
PRIMARY KEY (id)) !
+DROP TABLE BEJB_MX1_UNI_BTOB !
+CREATE TABLE BEJB_MX1_UNI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER,
FK_FOR_AEJB_MX1_UNI_BTOB VARCHAR(255), PRIMARY KEY (id)) !
+CREATE INDEX I_BJMX1TB_A1 ON BEJB_MX1_UNI_BTOB (FK_FOR_AEJB_MX1_UNI_BTOB) !
+-- ALTER TABLE BEJB_MX1_UNI_BTOB ADD CONSTRAINT FK_FOR_AEJB_MX1_UN FOREIGN KEY (FK_FOR_AEJB_MX1_UNI_BTOB)
REFERENCES AEJB_MX1_UNI_BTOB (ID) !
+
+-- =======================================================================
+--
+DROP TABLE PROJECT!
+CREATE TABLE PROJECT (PROJID INT NOT NULL, NAME VARCHAR(25), BUDGET DECIMAL(18,0), CONSTRAINT
PK_PROJECT PRIMARY KEY (PROJID))!
+
+-- =======================================================================
+-- DROP TABLE A_BIGINTEGER!
+-- CREATE TABLE A_BIGINTEGER ( ID VARCHAR(255), NAME VARCHAR(255) , VALUE INT, BASICINTEGER
INT, BASICSHORT SMALLINT, BASICBIGSHORT SMALLINT, BASICFLOAT FLOAT, BASICBIGFLOAT FLOAT, BASICLONG
BIGINT, BASICBIGLONG BIGINT, BASICDOUBLE DOUBLE, BASICBIGDOUBLE DOUBLE, BASICCHAR CHAR, BASICCHARARRAY
VARCHAR(448), BASICBIGCHARARRAY VARCHAR(448), BASICBYTEARRAY  LONG VARCHAR FOR BIT DATA, BASICBIGBYTEARRAY
LONG VARCHAR FOR BIT DATA, BASICBIGINTEGER DECIMAL(18,0) PRIMARY KEY NOT NULL, BASICBIGDECIMAL
DECIMAL(18,0), BASICDATE DATE, BASICTIME TIME, BASICCALENDAR DATE, BASICTIMESTAMP TIMESTAMP
)!
+-- DROP TABLE A_BIGDECIMAL!
+-- CREATE TABLE A_BIGDECIMAL ( ID VARCHAR(255), NAME VARCHAR(255) , VALUE INT, BASICINTEGER
INT, BASICSHORT SMALLINT, BASICBIGSHORT SMALLINT, BASICFLOAT FLOAT, BASICBIGFLOAT FLOAT, BASICLONG
BIGINT, BASICBIGLONG BIGINT, BASICDOUBLE DOUBLE, BASICBIGDOUBLE DOUBLE, BASICCHAR CHAR, BASICCHARARRAY
VARCHAR(448), BASICBIGCHARARRAY VARCHAR(448), BASICBYTEARRAY  LONG VARCHAR FOR BIT DATA, BASICBIGBYTEARRAY
LONG VARCHAR FOR BIT DATA, BASICBIGINTEGER DECIMAL(18,0), BASICBIGDECIMAL DECIMAL(18,0) PRIMARY
KEY NOT NULL, BASICDATE DATE, BASICTIME TIME, BASICCALENDAR DATE, BASICTIMESTAMP TIMESTAMP
)!

Propchange: openjpa/trunk/openjpa-integration/tck/sql/db2.sql
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-integration/tck/sql/derby.sql
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/tck/sql/derby.sql?rev=1443246&view=auto
==============================================================================
--- openjpa/trunk/openjpa-integration/tck/sql/derby.sql (added)
+++ openjpa/trunk/openjpa-integration/tck/sql/derby.sql Wed Feb  6 22:30:09 2013
@@ -0,0 +1,37 @@
+-- =======================================================================
+-- com.sun.ts.tests.ejb30.persistence.entitytest.cascadeall.oneXone
+DROP TABLE AEJB_1X1_BI_BTOB ;
+CREATE TABLE AEJB_1X1_BI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER,
PRIMARY KEY (id)) ;
+DROP TABLE BEJB_1X1_BI_BTOB ;
+CREATE TABLE BEJB_1X1_BI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER,
FK_FOR_AEJB_1X1_BI_BTOB VARCHAR(255), PRIMARY KEY (id)) ;
+CREATE INDEX I_BJ1X1B_BTB_A1 ON BEJB_1X1_BI_BTOB (FK_FOR_AEJB_1X1_BI_BTOB) ;
+-- ALTER TABLE BEJB_1X1_BI_BTOB ADD CONSTRAINT FK_FOR_AEJB_1X1_BI FOREIGN KEY (FK_FOR_AEJB_1X1_BI_BTOB)
REFERENCES AEJB_1X1_BI_BTOB (ID) ;
+
+-- =======================================================================
+-- com.sun.ts.tests.ejb30.persistence.entitytest.cascadeall.oneXmany
+DROP TABLE AEJB_1XM_BI_BTOB ;
+CREATE TABLE AEJB_1XM_BI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER,
PRIMARY KEY (id)) ;
+DROP TABLE BEJB_1XM_BI_BTOB ;
+CREATE TABLE BEJB_1XM_BI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER,
FK_FOR_AEJB_1XM_BI_BTOB VARCHAR(255), PRIMARY KEY (id)) ;
+CREATE INDEX I_BJ1XMTB_A1 ON BEJB_1XM_BI_BTOB (FK_FOR_AEJB_1XM_BI_BTOB) ;
+-- ALTER TABLE BEJB_1XM_BI_BTOB ADD CONSTRAINT FK_FOR_AEJB_1XM_BI FOREIGN KEY (FK_FOR_AEJB_1XM_BI_BTOB)
REFERENCES AEJB_1XM_BI_BTOB (ID) ;
+
+-- =======================================================================
+-- com.sun.ts.tests.ejb30.persistence.entitytest.cascadeall.manyXone
+DROP TABLE AEJB_MX1_UNI_BTOB ;
+CREATE TABLE AEJB_MX1_UNI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER,
PRIMARY KEY (id)) ;
+DROP TABLE BEJB_MX1_UNI_BTOB ;
+CREATE TABLE BEJB_MX1_UNI_BTOB (id VARCHAR(255) NOT NULL, name VARCHAR(255), value INTEGER,
FK_FOR_AEJB_MX1_UNI_BTOB VARCHAR(255), PRIMARY KEY (id)) ;
+CREATE INDEX I_BJMX1TB_A1 ON BEJB_MX1_UNI_BTOB (FK_FOR_AEJB_MX1_UNI_BTOB) ;
+-- ALTER TABLE BEJB_MX1_UNI_BTOB ADD CONSTRAINT FK_FOR_AEJB_MX1_UN FOREIGN KEY (FK_FOR_AEJB_MX1_UNI_BTOB)
REFERENCES AEJB_MX1_UNI_BTOB (ID) ;
+
+-- =======================================================================
+-- 
+DROP TABLE PROJECT;
+CREATE TABLE PROJECT (PROJID INT NOT NULL, NAME VARCHAR(25), BUDGET DECIMAL(18,0), CONSTRAINT
PK_PROJECT PRIMARY KEY (PROJID));
+
+-- =======================================================================
+-- DROP TABLE A_BIGINTEGER;
+-- CREATE TABLE A_BIGINTEGER ( ID VARCHAR(255), NAME VARCHAR(255) , VALUE INT, BASICINTEGER
INT, BASICSHORT SMALLINT, BASICBIGSHORT SMALLINT, BASICFLOAT FLOAT, BASICBIGFLOAT FLOAT, BASICLONG
BIGINT, BASICBIGLONG BIGINT, BASICDOUBLE DOUBLE, BASICBIGDOUBLE DOUBLE, BASICCHAR CHAR, BASICCHARARRAY
VARCHAR(448), BASICBIGCHARARRAY VARCHAR(448), BASICBYTEARRAY  LONG VARCHAR FOR BIT DATA, BASICBIGBYTEARRAY
LONG VARCHAR FOR BIT DATA, BASICBIGINTEGER DECIMAL(18,0) PRIMARY KEY NOT NULL, BASICBIGDECIMAL
DECIMAL(18,0), BASICDATE DATE, BASICTIME TIME, BASICCALENDAR DATE, BASICTIMESTAMP TIMESTAMP
);
+-- DROP TABLE A_BIGDECIMAL;
+-- CREATE TABLE A_BIGDECIMAL ( ID VARCHAR(255), NAME VARCHAR(255) , VALUE INT, BASICINTEGER
INT, BASICSHORT SMALLINT, BASICBIGSHORT SMALLINT, BASICFLOAT FLOAT, BASICBIGFLOAT FLOAT, BASICLONG
BIGINT, BASICBIGLONG BIGINT, BASICDOUBLE DOUBLE, BASICBIGDOUBLE DOUBLE, BASICCHAR CHAR, BASICCHARARRAY
VARCHAR(448), BASICBIGCHARARRAY VARCHAR(448), BASICBYTEARRAY  LONG VARCHAR FOR BIT DATA, BASICBIGBYTEARRAY
LONG VARCHAR FOR BIT DATA, BASICBIGINTEGER DECIMAL(18,0), BASICBIGDECIMAL DECIMAL(18,0) PRIMARY
KEY NOT NULL, BASICDATE DATE, BASICTIME TIME, BASICCALENDAR DATE, BASICTIMESTAMP TIMESTAMP
);

Propchange: openjpa/trunk/openjpa-integration/tck/sql/derby.sql
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: openjpa/trunk/openjpa-integration/tck/tck2-20110815.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/tck/tck2-20110815.xml?rev=1443246&r1=1443245&r2=1443246&view=diff
==============================================================================
--- openjpa/trunk/openjpa-integration/tck/tck2-20110815.xml (original)
+++ openjpa/trunk/openjpa-integration/tck/tck2-20110815.xml Wed Feb  6 22:30:09 2013
@@ -23,7 +23,7 @@
     the TCK, config  and patches zip files located at:
 
         ${user.home}/.m2/privaterepos/jpatck-2.0_15-Aug-2011.zip
-        ${user.home}/.m2/privaterepos/jpatck-2.0_15-Aug-2011_config.zip
+        ${user.home}/.m2/privaterepos/jpatck-2.0_15-Aug-2011_config.zip (may not exist)
 
     If you have that file in a different location, it can be specified with
     the "tck.zip" and "tck_patches.zip" system property.
@@ -90,11 +90,11 @@
         Description:  This updates the TCK configuration for OpenJPA.
      -->
     <target name="setup">
-        <property name="db.name" value="derby" />
-        <property name="db.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
-        <property name="db.url" value="jdbc:derby:derby-database;create=true" />
-        <property name="db.username" value="nousername" />
-        <property name="db.password" value="nopassword" />
+        <property name="db.name" value="${tck.db.name}" />
+        <property name="db.driver" value="${connection.driver.name}" />
+        <property name="db.url" value="${connection.url}" />
+        <property name="db.username" value="${connection.username}" />
+        <property name="db.password" value="${connection.password}" />
 
         <property name="openjpa.Log" value="DefaultLevel=TRACE" />
 
@@ -116,12 +116,14 @@ openjpa.FetchBatchSize: -1
 openjpa.Compatibility: StrictIdentityValues=true
 openjpa.Sequence: time
 openjpa.Log: ${openjpa.Log}
-openjpa.jdbc.DBDictionary: StoreCharsAsNumbers=true
+openjpa.jdbc.DBDictionary: NumericTypeName=DECIMAL
+# openjpa.jdbc.DBDictionary: StoreCharsAsNumbers=true
 # openjpa.jdbc.DBDictionary: (StoreCharsAsNumbers=true,NumericTypeName=DECIMAL)
 openjpa.jdbc.SchemaFactory: native(ForeignKeys=true)
 openjpa.jdbc.SynchronizeMappings: buildSchema(ForeignKeys=true)
+openjpa.ConnectionFactoryProperties: PrintParameters=True
         </echo>
-        
+
         <path id="javart">
             <fileset dir="${java.home}/lib">
               <include name="**/*.jar" />
@@ -158,6 +160,9 @@ database.passwd=${db.password}
 database.url=${db.url}
 database.driver=${db.driver}
 databaseName=${db.name}
+jdbc.lib.classpath=${cp.test.classpath}
+# disable initdb.xml table creation
+create.cmp.tables=false
 
         </echo>
 
@@ -178,6 +183,7 @@ databaseName=${db.name}
             <fileset dir="../../openjpa/target">
                 <include name="*.jar" />
                 <exclude name="*-sources.jar" />
+                <exclude name="*-shaded.jar" />
                 <exclude name="original-*.jar" />
                 <exclude name="*-tests.jar" />
                 <exclude name="*-javadoc.jar" />
@@ -187,6 +193,10 @@ databaseName=${db.name}
         <property name="agent.properties" value="" />
         <echo>AGENT: ${agent}${agent.properties}</echo>
 
+        <!-- Use the following values to start Eclipse remote debug
+    	<property name="DEBUG" value="-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7777"
/>
+        -->    	
+    	<property name="DEBUG" value="" />
         <!--
             Add in a javaagent argument (optional in JPA2 TCK.)
             Also, we need to specify the default MetaDataFactory
@@ -194,7 +204,7 @@ databaseName=${db.name}
             persistent classes to work (like the SignatureTest)
         -->
         <replace file="${jpatck.config}">
-            <replacefilter token="-Ddeliverable.class=${deliverable.class}" value="-Ddeliverable.class=${deliverable.class}
-javaagent:${agent}${agent.properties} -Dopenjpa.MetaDataFactory=jpa(DefaultAccessType=PROPERTY)"/>
+            <replacefilter token="-Ddeliverable.class=${deliverable.class}" value="-Ddeliverable.class=${deliverable.class}
-javaagent:${agent}${agent.properties} ${DEBUG} -Dopenjpa.MetaDataFactory=jpa(DefaultAccessType=PROPERTY)"/>
         </replace>
 
         <!-- Fix path for java.security.policy -->
@@ -295,7 +305,7 @@ databaseName=${db.name}
         Input: jpatck.pkg.dir System property defines a commna-spearated list of test cases
to be run.
                If not set or set to empty string, all tck tests will be exercised.
         Note: Beaware if jpatck.pkg.dir includes pluggability test in the dir hierarchy,
the pluggability
-              test will fail (5 failures) due to [enable|disable].ts.persistence.provider
targets are 
+              test will fail (5 failures) due to [enable|disable].ts.persistence.provider
targets are
               not invoked, which is required for the pluggability tests.
      -->
     <target name="run-tck">
@@ -324,18 +334,24 @@ databaseName=${db.name}
         <tsant dir="${tck.dir}/bin" buildfile="${tck.dir}/bin/initdb.xml" target="init.database"
/>
         <echo>TCK initdb.xml returned result=${tsant.result}</echo>
 
+        <!-- Database table set up -->
+        <!-- OpenJPA relies on SynchronizeMappings to create the database tables...
+             ... except in a couple of cases where we will pre-create the tables.   -->
+        <echo>Calling OpenJPA create.openjpa.sql.xml</echo>
+        <ant antfile="${basedir}/sql/create.openjpa.sql.xml" inheritRefs="true" />
+
         <property name="jpatck.run.tmo" value="7200000" />
         <!-- now run the TCK -->
         <if>
             <and>
                 <isset property="jpatck.pkg.dir" />
                 <not>
-                    <length string="${jpatck.pkg.dir}" trim="true" length="0" /> 
+                    <length string="${jpatck.pkg.dir}" trim="true" length="0" />
                 </not>
             </and>
         <then>
             <for list="${jpatck.pkg.dir}" param="for.test" trim="true">
-                <sequential>            
+                <sequential>
                     <if>
                         <contains string="@{for.test}" substring="pluggability"/>
                     <then>
@@ -343,11 +359,11 @@ databaseName=${db.name}
                         <tsant buildfile="${tck.dir}/bin/build.xml" target="enable.ts.persistence.provider"
/>
                     </then>
                     </if>
-            
+
                     <echo>Calling TCK build.xml for pkg.dir=@{for.test}</echo>
                     <property name="dir" value="${tck.dir}/src/@{for.test}" />
                     <tsant dir="${dir}" buildfile="${dir}/build.xml" target="runclient"
tmo="${jpatck.run.tmo}" />
-            
+
                     <if>
                         <contains string="@{for.test}" substring="pluggability"/>
                     <then>
@@ -356,7 +372,7 @@ databaseName=${db.name}
                     </then>
                     </if>
                 </sequential>
-            </for>          
+            </for>
         </then>
         <else>
             <echo>Calling TCK build.xml for ALL tests</echo>

Modified: openjpa/trunk/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/pom.xml?rev=1443246&r1=1443245&r2=1443246&view=diff
==============================================================================
--- openjpa/trunk/pom.xml (original)
+++ openjpa/trunk/pom.xml Wed Feb  6 22:30:09 2013
@@ -375,6 +375,8 @@
                 <connection.password />
                 <!-- Tests are much faster without shutting derby down at the end of each
test. -->
                 <jdbc.DBDictionary>ShutdownOnClose=false</jdbc.DBDictionary>
+                <!-- TCK specific properties -->
+                <tck.db.name>derby</tck.db.name>
             </properties>
         </profile>
 



Mime
View raw message