| Summary: | tests of jpa cacheable model failed with NPE and junit.framework.AssertionFailedError | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Yiping Zhao <yiping.zhao> |
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | kevin.yuan, michael.f.obrien, tom.ware |
| Version: | unspecified | Keywords: | test |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Yiping Zhao
above test failures are the one on WebLogic, the same tests failed on GlassFish V3 except testInheritanceCacheable It appears this test is incompatible with the server test framework as it currently works. Some observations: 1. The build file omits several entities from the cacheable model jar. 2. When #1 is fixed my calls to getPUServerSession(<puName>) always behave as if <puName> is "default' 3. With #1 fixed all the rest of the failures I am getting are serialization issiues. I suspect this is related to the fact that these tests use multiple entity managers and I have had some issues with doing that when previous tests I have written are moved from SE to the server test framework At the moment, these testing issues appear to be related to compatibility of the Cacheable tests with the server test framework and are not showing any issues with our implementation of cacheable. For now I am setting this bug to "test". We can reassign when we address some of those issues. After investigation, I found the problems are:
* sessionbean class can't have super class which itself is a sessionbean class, so I changed the extra test runner beans to not extend the original TestRunnerBean as I did originally
* one single test case class can't have multiple persistence unit tests because we only one test runner which has one entity manager is associated with one test case class, so I wrote several individual server tests by retrieved from original tests according to persistence init , each test case class has only one single persistence unit associated
* changed JUnitTestCase to lookup different test runner regarding to if it's single persistence unit or multiple persistence units
The changes are:
(1). modify jpa/build.xml to not replacing the multiple persistence unit names in test runner beans since the persistence unit names are fixed one now. "MulitPU-1" ... "MulitPU-5"
(2). modify TestRunner1Bean.java ... TestRunner4Bean.java to not extend the TestRunnerBean, and implement its own remote interface since WebSphere needs that, add new TestRunner5Bean.java. The new test runner interfaces are added like TestRunner1.java ... TestRunner5.java under jpa\eclipselink.jpa.test\src\org\eclipse\persistence\testing\framework\
(3). change eclipselink.jpa.test\src\org\eclipse\persistence\testing\framework\junit\JUnitTestCase.java to lookup different test runner regarding to single or multiple persistence units
(4). add CacheableServerTestSuite.java including individual persistence unit tests CacheableModelJunitTestAll.java, CacheableModelJunitTestDisableSelective.java, CacheableModelJunitTestEnableSelective.java, CacheableModelJunitTestNone.java and CacheableModelJunitTestUnspecified.java for server only
code is checked in SVN as revision 7897 and reviewed by Kevin Yuan.
checked in fix in 2.1 as revision 7924 The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |