Bug 311726 - Enable BeanValidationJunitTest
Summary: Enable BeanValidationJunitTest
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: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2010-05-05 09:54 EDT by Yiping Zhao CLA
Modified: 2022-06-09 10:23 EDT (History)
1 user (show)

See Also:


Attachments
changes to enable BeanValidationJUnitTest to run (2.95 KB, patch)
2010-05-05 10:29 EDT, Yiping Zhao CLA
no flags Details | Diff
updated patch (4.03 KB, patch)
2010-05-05 15:42 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 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