Bug 290065 - add ant targets in jpa/eclipselink.jpa.test/build.xml to make exisitng JPA tests running against Spring
Summary: add ant targets in jpa/eclipselink.jpa.test/build.xml to make exisitng JPA te...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2009-09-21 15:39 EDT by Yiping Zhao CLA
Modified: 2022-06-09 10:04 EDT (History)
0 users

See Also:


Attachments
This patch is for adding targets in jpa/eclipselink.jpa.test/build.xml to run existing JPA tests on Spring (9.36 KB, patch)
2009-09-22 09:18 EDT, Yiping Zhao CLA
no flags Details | Diff
updated build.xml and test.properties (11.08 KB, patch)
2009-09-22 11:43 EDT, Yiping Zhao CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yiping Zhao CLA 2009-09-21 15:39:26 EDT
We have jpa tests under <trunk>/jpa/eclipselink.jpa.test/src, these tests are able to run against Spring after James check in fix for bug 288383. Now I make changes in build.properties and build.xml under <trunk>/jpa/eclipselink.jpa.test to let two models running first against Spring, which is fieldaccess and annotation models, the changes are:

1. add following proeprty-value sets to build.properties
(1). spring.jlib.dir=../../../extension.lib.external/spring

(2). spring.jlib=spring.jar,spring-mock.jar,spring-agent.jar,cglib-nodep-2.2.jar,cglib-nodep-2.1_3.jar,commons-logging-1.1.1.jar,spring-test.jar,commons-logging.jar,xapool.jar,jotm-client.jar" to build.properties

(3). eclipselink.jpa.spring.test=../eclipselink.jpa.spring.test

2. add "is.spring" condition property to build.xml

3. add "prepare-spring-xmls" target to prepare spring config files and persistence.xml

4. add antcall of "prepare-spring-xmls" to target of packaging model classes

5. add "test-spring-srg" target to invoke running two applicable test mdoels
Comment 1 Yiping Zhao CLA 2009-09-22 09:18:17 EDT
Created attachment 147774 [details]
This patch is for adding targets in jpa/eclipselink.jpa.test/build.xml to run existing JPA tests on Spring

Also this patch updated the build.properties under jpa/eclipselink.jpa.spring.test to reflect spring jars needed for testing according to Spring 2.5.6 release.

The Spring jars needed for tests under jpa/eclipselink.jpa.spring.test are:
    spring.jar,spring-agent.jar,cglib-nodep-2.1_3.jar,commons-logging.jar,xapool.jar,jotm-client.jar, spring-test.jar

The Spring jars needed for tests under jpa/eclipselink.jpa.test are same as above except that the tests here don't need spring-test.jar
Comment 2 Yiping Zhao CLA 2009-09-22 11:43:47 EDT
Created attachment 147793 [details]
updated build.xml and test.properties

Based on feedback from Edwin, the new changes are:

1. add "is.spring" to test.properties to specify if you are running JPA tests on Spring, by this way you don't need to use "server.name"

2. add spring.path and remove spring jars from compile.path and run.classpath

3. separate compiling spring platform class from "compile-standard"

4. instead of using common "run-test" for Spring testing, add "run-spring-test" target specifically for Spring testing to specify TEST-SERVER_PLATFORM to be "org.eclipse.persistence.testing.framework.server.SpringPlatform"
Comment 3 Yiping Zhao CLA 2009-09-22 14:54:56 EDT
fix has been checked in Main as revision 5214.
Comment 4 Yiping Zhao CLA 2009-09-24 09:41:05 EDT
it has been checked in 1.2 branch as well
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:04:53 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink