OPENJPA-1177 Preparing for upgrade to newer JSR-303 1.0.CR3 spec level with some extra tracing, as checkCVE() is going to be broken.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@794412 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Donald Woods 2009-07-15 20:49:20 +00:00
parent aefd05089d
commit 21fec94f19
1 changed files with 9 additions and 3 deletions

View File

@ -295,6 +295,7 @@ public class TestValidationGroups extends PersistenceTestCase {
"default-validation-group",
"org/apache/openjpa/integration/validation/persistence.xml");
assertNotNull(emf);
getLog(emf).trace("verifyDefaultValidationGroup(" + flush + ")");
// create EM
OpenJPAEntityManager em = emf.createEntityManager();
assertNotNull(em);
@ -373,6 +374,7 @@ public class TestValidationGroups extends PersistenceTestCase {
"non-default-validation-group",
"org/apache/openjpa/integration/validation/persistence.xml");
assertNotNull(emf);
getLog(emf).trace("verifyNonDefaultValidationGroup(" + flush + ")");
// create EM
OpenJPAEntityManager em = emf.createEntityManager();
assertNotNull(em);
@ -499,6 +501,7 @@ public class TestValidationGroups extends PersistenceTestCase {
"default-validation-group",
"org/apache/openjpa/integration/validation/persistence.xml");
assertNotNull(emf);
getLog(emf).trace("verifyDefaultPreRemove(" + flush + ")");
// create EM
OpenJPAEntityManager em = emf.createEntityManager();
assertNotNull(em);
@ -551,6 +554,7 @@ public class TestValidationGroups extends PersistenceTestCase {
"pre-remove-default-validation-group",
"org/apache/openjpa/integration/validation/persistence.xml");
assertNotNull(emf);
getLog(emf).trace("verifySpecifiedDefaultPreRemove(" + flush + ")");
// create EM
OpenJPAEntityManager em = emf.createEntityManager();
assertNotNull(em);
@ -608,14 +612,16 @@ public class TestValidationGroups extends PersistenceTestCase {
ConstraintViolation<?> v = (ConstraintViolation<?>)i.next();
boolean found = false;
for (String vio : vioProperties) {
if (v.getPropertyPath().equals(vio)) {
// TODO - getPropertyPath() will return a Path in future APIs
if (v.getPropertyPath().compareTo(vio) == 0) {
found = true;
break;
}
}
if (!found)
if (!found) {
fail("Unexpected ConstraintViolation for: " +
v.getPropertyPath());
}
}
}
@ -631,7 +637,7 @@ public class TestValidationGroups extends PersistenceTestCase {
/**
* Internal convenience method for getting the OpenJPA logger
*
* @return
* @return Log
*/
private Log getLog(OpenJPAEntityManagerFactorySPI emf) {
return emf.getConfiguration().getLog("Tests");