Bug 391932 - testValidateMafiaFamily123() failed in project cache testing
Summary: testValidateMafiaFamily123() failed in project cache testing
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2012-10-15 10:32 EDT by Yiping Zhao CLA
Modified: 2022-06-09 10:33 EDT (History)
3 users (show)

See Also:


Attachments
Test changes (3.75 KB, patch)
2013-05-24 11:21 EDT, Guy Pelletier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yiping Zhao CLA 2012-10-15 10:32:34 EDT
In jpa project cache testing in trunk, we have to run org.eclipse.persistence.testing.tests.jpa.advanced.multitenant.AdvancedMultiTenant123JunitTest and org.eclipse.persistence.testing.tests.jpa.advanced.multitenant.AdvancedMultiTenantSharedEMFJunitTest seperately since the two test suites represent different persistence units. So the static variable value of "family707Mafiosos" generated in testCreateMafiaFamily707() is lost when refering it at "Boss otherBoss = em.find(Boss.class, family707Mafiosos.get(0));" in testValidateMafiaFamily123().

So this test case bug is used to describe the scenario.
Comment 1 Guy Pelletier CLA 2013-05-24 11:21:34 EDT
Created attachment 231480 [details]
Test changes

The offending test (testValidateMafiaFamily123()) needs to be overridden in AdvancedMultiTenant123JunitTest then. You can't rely on the static variables from the parent when dealing with just one PU at a time.
Comment 2 Guy Pelletier CLA 2013-05-24 11:39:35 EDT
Changes pushed.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:33:47 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink