Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311726

Summary: Enable BeanValidationJunitTest
Product: z_Archived Reporter: Yiping Zhao <yiping.zhao>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eric.gwin
Version: unspecifiedKeywords: test
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
changes to enable BeanValidationJUnitTest to run
none
updated patch none

Description Yiping Zhao CLA 2010-05-05 09:54:52 EDT
Right now we have this test disabled in FullRegressionTestSuite since it needs third party dependency jars, now we need to let it run to catch feature bugs, the solution is we put the jars locally to our nightly machine to get it run. 

Also we need to seperated this test from FullRegressionTestSuite, create "run-bean-validation-tests" to run the test only if it finds the third party dependency jars.
Comment 1 Yiping Zhao CLA 2010-05-05 10:29:34 EDT
Created attachment 167143 [details]
changes to enable BeanValidationJUnitTest to run
Comment 2 Eric Gwin CLA 2010-05-05 12:49:17 EDT
Yiping,

I'd be more comfortable with an additional path:

bean.validation.run.classpath
  <path refid-run.path>
  <pathelement path="../../../extension.lib.external/${hibernate.jar}"/>
  <pathelement path="../../../extension.lib.external/${slf4j.jdk.jar}"/>
  <pathelement path="../../../extension.lib.external/${slf4j.api.jar}"/>
  <pathelement path="../../../extension.lib.external/${validation.api.jar}"/>

and then have run-bean-validation-tests use:
    <param name="RUN_PATH" value="bean.validation.run.classpath"/>

That way no additional jars are added to the classpath used by other tests either way.

Otherwise looks good (though there are known sideeffects to using antcall to set paths).

-Eric
Comment 3 Yiping Zhao CLA 2010-05-05 15:42:48 EDT
Created attachment 167215 [details]
updated patch
Comment 4 Yiping Zhao CLA 2010-05-06 13:48:04 EDT
The changes are:

 - define properties of 4 validate jars needed for the testing in eclipselink.jpa.test/build.properties
 - add "run.bean.validation.classpath" to specify the classes needed to run bean validation tests, instead of adding the jars directly to "run.classpath" in eclipselink.jpa.test/build.xml
 - add "run-bean-validation-tests" target for bean validation tests only in eclipselink.jpa.test/build.xml and add comments before "run-bean-validation-tests" to say what kind of classes are needed to run the tests in eclipselink.jpa.test/build.xml
 - delete comments and "BeanValidationJunitTest" entry from FullRegressionTestSuite
 - small fix of testEmbeddedWithInvalidData() and testUpdateWithInvalidData() in BeanValidationJunitTest.java, the fix is provided by Mitesh

code is reviewed by Edwin Tang, Eric Gwin, Mitesh Meswani
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:23:31 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink