rzo1 commented on PR #305:
URL: https://github.com/apache/openjpa/pull/305#issuecomment-6818422957

   The 8 Derby failures in TestEmbeddableCriteria (embeddableQuery76..83) come 
from wrong expected SQL that the old setup never checked. The expected SQL 
names the join table `TBL1A_embeds`; OpenJPA names an element collection table 
after the entity, so the real table is `EntityA_Coll_Embed_Embed_embeds`. On 
master the SQL was only compared in the first test method: 
`EmbeddableDomainTestCase` set the dictionary only in the instance that created 
the shared EMF, so later instances skipped the comparison 
(testEmbeddableQuery76 alone fails on master too). In this PR 
`countTestMethods()` still looks for public `test*` methods and finds none, so 
the EMF is rebuilt per method, every method compares, and the wrong 
expectations show up. H2 passes because the comparison only runs on 
Derby/MySQL/MariaDB.
   
   I pushed two commits: `setDictionary()` in every `setUp()` of 
`EmbeddableDomainTestCase` and `JoinDomainTestCase` (as `CriteriaTest` does) 
plus the corrected table name in the 8 expected SQL strings (c62d4aa11), and an 
`@AfterAll` that closes the shared EMF of `TestEmbeddableCriteria` instead of 
the method counting, which also runs when tests are skipped (c855243a1; the 
class goes from ~14 s back to <1 s). All criteria tests pass on Derby (632 run, 
0 failures).
   


-- 
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]

Reply via email to