Il giorno 11/gen/2013, alle ore 11.00, Andrei Shakirin ha scritto: > Hi, > > Working on integration tests improvement (1), I discovered that almost all > persistence beans have TABLE generated Id strategy defined in orm.xml: user, > role, membership, mapping, connInstance, attr. > Anyway AUTO generated Id strategy is defined for following of the persistence > beans: AbstractDerAttr, AbstractVirAttr, Notification, UserRequest. > Is there good reason to keep it differently?
Hi Andrei, I cannot remember the good reason for this differences but it there was ... In our experience with Apache Syncope (especially at the beginning) there are troubles with AUTO generated id in case of high concurrence. From my PPOV you can try to change this implementation but you have to verify your fix with all the supported databases generating a lot of concurrent accesses to the entities interested by your changes. > Actually I am struggling with strange effect in NotificationTestITCase: > create() and issueSYNCOPE83() work successfully ONLY if delete() removes > Notification with id=101. > If delete() is marked with @Ignore - create() and issueSYNCOPE83() throw > DataIntegrityViolation exception. > Even more strange: if previously running tests: AuthenticationTestITCase, > ConfigurationtestITCase, ConnInstanceTestITCase, DerivedSchemaTestITCase are > deactivated, problem is not reproducible anymore - create() and > issueSYNCOPE83() work successfully without delete(). > I guess the problem is caused Id generation, will investigate it a little bit > more. > > Have anyone other ideas what could be the reason? I cannot be sure about the reason but, please, consider that integration tests are interdependent: the order and the existence of a certain test are often fundamental. Cheers, F. > > Cheers, > Andrei. > > > (1) https://issues.apache.org/jira/browse/SYNCOPE-268