Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336726

Summary: Make tests of the testsuite eclipselink.jpa.wdf.test run with caching
Product: z_Archived Reporter: Adrian Goerler <adrian.goerler>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipselink.orm-inbox, gordon.yorke, jamesssss, konstantin.schwed, krum.tsvetkov, michael.f.obrien, sabine.heider, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: test
Bug Depends on: 336741, 337422, 337427    
Bug Blocks:    
Attachments:
Description Flags
patch enabling the cache selectively
none
proposed fix -trunk
none
proposed fix - 231
none
updated patch 231
none
updated patch trunk
none
patch for trunk for additional issues
none
small update to 2.3 based on feedback
none
2.3 update for intermittent test failure
none
Larger patch to fix intermittent testing issue none

Description Adrian Goerler CLA 2011-02-09 10:57:25 EST
The tests in the testsuite eclipselink.jpa.wdf.test originally have been written for a JPA implementation, which allows to have references from cacheable to non-cacheable entities. The model underlying the tests makes heavy use of this possibility.

Up to recently, this has not been possible in EclipseLink. Hence caching has been disabled in the testmodel of eclipselink.jpa.wdf.test using a

<property name="eclipselink.cache.shared.default" value="false"/>

switch.

With patch https://bugs.eclipse.org/bugs/show_bug.cgi?id=232063 EclipseLink now supports having relationships from cacheable to non-cacheable entities. The task of this bug is to assess if caching can now be selectively be enabled for the eclipselink.jpa.wdf.test testuite.
Comment 1 Adrian Goerler CLA 2011-02-09 12:14:26 EST
Created attachment 188603 [details]
patch enabling the cache selectively
Comment 2 Adrian Goerler CLA 2011-02-17 07:48:20 EST
Some child bugs filed for issues that are not apparently correlated.
Comment 3 Adrian Goerler CLA 2011-05-27 11:51:36 EDT
Setting the target milestone back to future.
Comment 4 Tom Ware CLA 2011-08-22 10:55:44 EDT
Created attachment 201926 [details]
proposed fix -trunk

This fix includes changes that allow the WDF tests to pass with caching enabled.  It fixes bugs listed as blockers for this bug and includes some additional changes.
Comment 5 Tom Ware CLA 2011-08-22 10:56:40 EDT
Created attachment 201927 [details]
proposed fix - 231

Fix has differences from trunk because some cache initialization functionality was refactored in trunk.
Comment 6 Tom Ware CLA 2011-08-23 09:45:06 EDT
Created attachment 201998 [details]
updated patch 231
Comment 7 Tom Ware CLA 2011-08-23 09:45:30 EDT
Created attachment 201999 [details]
updated patch trunk
Comment 8 Tom Ware CLA 2011-08-23 09:46:22 EDT
*** Bug 336741 has been marked as a duplicate of this bug. ***
Comment 9 Tom Ware CLA 2011-08-23 09:46:43 EDT
*** Bug 337427 has been marked as a duplicate of this bug. ***
Comment 10 Tom Ware CLA 2011-08-23 10:25:17 EDT
Changes descriptor initialization to propogate PROTECTED setting to more descriptors.  Also fixes some issues with propogating and using protected keys for protected descriptors.

Reviewed By Gordon Yorke

Tested by Enabling caching on the WDF test suite and fixing issues

Also tested with JPA and Core LRG
Comment 11 James Sutherland CLA 2011-09-08 13:22:05 EDT
Found some additional issue with mixing cacheable in trunk,

- relationships to protected classes were being marked as non-cacheable, but they should be cacheable -- fixed to allow caching
- aggregate collections (element collection) do not have a cache-key when being built, so protected aggregate collections will not work -- fixed for now by making element collections that have non-cacheable relationships as non-cacheable
- aggregates (embeddables) were computing if they have non-cacheable mappings in initial, but non-cacheable is not set in mappings until postInitialize -- fixed to do both in initialize
Comment 12 James Sutherland CLA 2011-09-08 13:39:42 EDT
also,
- foreign key value were not cached for aggregates as the hasNonCacheableMappings check did not work, and the code was casting to ForeignReferenceMapping
Comment 13 James Sutherland CLA 2011-09-08 14:00:10 EDT
Created attachment 203015 [details]
patch for trunk for additional issues
Comment 14 Tom Ware CLA 2011-09-22 15:38:47 EDT
Created attachment 203861 [details]
small update to 2.3 based on feedback
Comment 15 Tom Ware CLA 2011-09-23 10:01:54 EDT
checked in change above into 2.3 only- issue is addressed in trunk.  This change adds some unit of work configuration.
Comment 16 Tom Ware CLA 2011-09-28 13:58:14 EDT
Created attachment 204206 [details]
2.3 update for intermittent test failure
Comment 17 Tom Ware CLA 2011-09-30 10:43:46 EDT
Created attachment 204388 [details]
Larger patch to fix intermittent testing issue
Comment 18 Eclipse Webmaster CLA 2022-06-09 10:27:46 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink