Hi again, again with my Syncope tests. When running this test class [1] I am getting two failures, on saveWithBinary() and saveWithEncrypted() Both test cases are about the same JPA entity instance and the failure reason is that validation catches some invalid email values. "email" is contained by the List<PlainAttr> as managed by AttributeConverter, as you might remember.
When I run those methods isolated, however, they both pass happily. Moreover, when I disable the invalidValueList() test case - which works once more on the same JPA entity instance as the two test cases mentioned above, the whole class is passing again. The code in invalidValueList() is purposely setting some invalid vale into "email", e.g. into plainAttrs; saving the entity results into an InvalidEntityException, as expected, but I can guess that the converted field remains in the OpenJPA cache, hence the test cases executed afterwards will pick the JPA entity instance with invalid email, and fail. What do you think? Regards. [1] https://github.com/apache/syncope/blob/master/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainAttrTest.java -- Francesco Chicchiriccò Tirasa - Open Source Excellence http://www.tirasa.net/ Member at The Apache Software Foundation Syncope, Cocoon, Olingo, CXF, OpenJPA https://about.me/ilgrosso
