Bug 296961 - Server testing uses transaction entity manager which mismatches assumptions made be tests
Summary: Server testing uses transaction entity manager which mismatches assumptions m...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
: 296387 296388 296389 296747 (view as bug list)
Depends on:
Blocks: 296178
  Show dependency tree
 
Reported: 2009-12-04 14:59 EST by Tom Ware CLA
Modified: 2022-06-09 10:31 EDT (History)
2 users (show)

See Also:


Attachments
patch for the bug (21.08 KB, patch)
2010-02-10 15:21 EST, Kevin Yuan CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Ware CLA 2009-12-04 14:59:02 EST
The server testing framework for EclipseLink injects an entity manager using the defaults.  This results in a transaction entity manager.

The JPA tests are written in Java SE and expect an extended persistence context - with much more transactional control.

This mismatch between assumptions needs to be corrected by either changing the test framework or the tests themselves.

This mismatch results in a number of test errors that are difficult to diagnose and a number of bugs are being set as duplicates of this bug.  When the issue is corrected, these tests should be rerun to see if there are still issues.
Comment 1 Tom Ware CLA 2009-12-04 15:00:16 EST
*** Bug 296747 has been marked as a duplicate of this bug. ***
Comment 2 Tom Ware CLA 2009-12-04 15:01:15 EST
*** Bug 296389 has been marked as a duplicate of this bug. ***
Comment 3 Tom Ware CLA 2009-12-04 15:01:20 EST
*** Bug 296388 has been marked as a duplicate of this bug. ***
Comment 4 Tom Ware CLA 2009-12-04 15:01:27 EST
*** Bug 296387 has been marked as a duplicate of this bug. ***
Comment 5 Tom Ware CLA 2009-12-04 15:01:32 EST
*** Bug 296381 has been marked as a duplicate of this bug. ***
Comment 6 Tom Ware CLA 2009-12-04 15:01:36 EST
*** Bug 296380 has been marked as a duplicate of this bug. ***
Comment 7 Tom Ware CLA 2009-12-04 15:01:41 EST
*** Bug 296376 has been marked as a duplicate of this bug. ***
Comment 8 Kevin Yuan CLA 2010-02-10 15:21:06 EST
Created attachment 158772 [details]
patch for the bug
Comment 9 Kevin Yuan CLA 2010-02-10 15:22:32 EST
Clone an TestRunnerBean.java without EntityManager injected, all nonJTA datasource or application managed EntityManager inside container testing should this TestRunnerBean.

Code Reviewed by Yiping Zhao.
Checked in trunk, revision: 6579.
Comment 10 Kevin Yuan CLA 2010-02-11 14:14:47 EST
Need to back port to 2.0.2 after 2.0.1 release and the branch is open to check in.
Comment 11 Kevin Yuan CLA 2010-02-19 15:36:50 EST
Backport to 2.0.2, revision: 6634.
Comment 12 Eclipse Webmaster CLA 2022-06-09 10:31:18 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink