Bug 292277 - "testCreateEntityManagerFactory2" failed with "junit.framework.AssertionFailedError: PersistenceException is expected" on WebSphere 7.0.0.5
Summary: "testCreateEntityManagerFactory2" failed with "junit.framework.AssertionFaile...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2009-10-14 10:57 EDT by Yiping Zhao CLA
Modified: 2022-06-09 10:27 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yiping Zhao CLA 2009-10-14 10:57:29 EDT
This test is in org.eclipse.persistence.testing.tests.jpa.advanced.EntityManagerJUnitTestSuite. It failed at "emf = Persistence.createEntityManagerFactory("default123");", WebSphere 7.0.0.5 returns null as for created EntityManagerFactory, but it doesn't throw PersistenceException as the test designed. 

Note: 

1. As for conversation with Tom, the ejb3.0 spec didn't say that the PersistenceException must throw at this situation, just EclipseLink's implementation beyond the spec. So this test should not run on WebSphere 7.0.0.5

2. I put javax.persistence_2.0_preview.jar and rename it to be javax.j2ee.persistence.jar under WAS7_INSTALL/plugins, the test passed.
Comment 1 Peter Krogh CLA 2009-11-27 13:40:48 EST
This bug fix did not make the cut off for 2.0.0. We are deferring the bugs to Future where we can properly sort them all together based on community votes and severity. We will then assign them accordingly to future patch sets and releases.
Comment 2 Peter Krogh CLA 2009-11-30 11:35:43 EST
Changing the priority of the bugs that have been recently triaged to future.  Targetting them to P2 will differentiate them from the P3s that have been triaged into future earlier.
Comment 3 Yiping Zhao CLA 2010-02-04 14:36:26 EST
By fixing the bug, add following condition is teh beginning of the test to exclude it from running on WebSphere:

if (getServerSession().getServerPlatform() != null && getServerSession().getServerPlatform() instanceof WebSphere_7_Platform){
            warning("The test <testCreateEntityManagerFactory2> is not supported on WebSphere, because the ejb3.0 spec doesn't say that the PersistenceException must throw at this situation, just EclipseLink's implementation beyond the spec. So this test should not run on WebSphere 7.0.0.5");
            return;
        }

The change has been checked in Main as revision 6499, 2.0.1 as revision 6498, 1.2 as revision 6500 and 1.1.0 as revision 6501.

code is reviewed by Edwin Tang.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:27:39 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink