Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336726 - Make tests of the testsuite eclipselink.jpa.wdf.test run with caching
Summary: Make tests of the testsuite eclipselink.jpa.wdf.test run with caching
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: test
Keywords:
: 336741 337427 (view as bug list)
Depends on: 336741 337422 337427
Blocks:
  Show dependency tree
 
Reported: 2011-02-09 10:57 EST by Adrian Goerler CLA
Modified: 2022-06-09 10:27 EDT (History)
8 users (show)

See Also:


Attachments
patch enabling the cache selectively (1.86 KB, patch)
2011-02-09 12:14 EST, Adrian Goerler CLA
no flags Details | Diff
proposed fix -trunk (20.51 KB, patch)
2011-08-22 10:55 EDT, Tom Ware CLA
no flags Details | Diff
proposed fix - 231 (26.26 KB, patch)
2011-08-22 10:56 EDT, Tom Ware CLA
no flags Details | Diff
updated patch 231 (26.58 KB, application/octet-stream)
2011-08-23 09:45 EDT, Tom Ware CLA
no flags Details
updated patch trunk (22.42 KB, patch)
2011-08-23 09:45 EDT, Tom Ware CLA
no flags Details | Diff
patch for trunk for additional issues (11.51 KB, patch)
2011-09-08 14:00 EDT, James Sutherland CLA
no flags Details | Diff
small update to 2.3 based on feedback (4.35 KB, patch)
2011-09-22 15:38 EDT, Tom Ware CLA
no flags Details | Diff
2.3 update for intermittent test failure (1.50 KB, patch)
2011-09-28 13:58 EDT, Tom Ware CLA
no flags Details | Diff
Larger patch to fix intermittent testing issue (123.50 KB, patch)
2011-09-30 10:43 EDT, Tom Ware CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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