rzo1 commented on PR #305: URL: https://github.com/apache/openjpa/pull/305#issuecomment-6824424575
`TestDataCacheBehavesIdentical`: Qwen was close. It is the shared sequence, but because of `CLEAR_TABLES`, not the two factories as such. `CLEAR_TABLES` deletes the contents of all tables, including the sequence table, when the *first EntityManager* of a factory is created. If the second factory is first used after the first one has already persisted `PObject`s and allocated an id block, its sequence starts over → duplicate key on `L2_POBJECT`. JUnit 3's declaration order happened to use both factories early; Jupiter's order does not. With that fixed, a random method order showed a second dependency: `verifyRefresh()` sets `RefreshFromDataCache` on the shared factories and never resets it, so a later delete-detection test refreshes from the data cache. Pushed 0eb1fdefd: both factories open an EntityManager right after creation, and `setUp()` resets `RefreshFromDataCache` for every test. 21/21 pass in declaration order and in 3 runs with `MethodOrderer$Random`. The class is still excluded in the pom (since 2015, "randomly failing"); we could re-enable it now if you like. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
