Bug 321716 - JPA2: Criteria query tests in modelgen are not in sync with duplicate code in jpa.test causing divide by zero error on Derby 10 on WebLogic
Summary: JPA2: Criteria query tests in modelgen are not in sync with duplicate code in...
Status: RESOLVED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL: http://fisheye2.atlassian.com/changel...
Whiteboard: derby
Keywords:
Depends on: 249218 292160 293708
Blocks: 321902
  Show dependency tree
 
Reported: 2010-08-04 09:55 EDT by Michael OBrien CLA
Modified: 2022-06-09 10:20 EDT (History)
3 users (show)

See Also:


Attachments
Duplicate test classes JUnitCriteriaSimpleTestSuite must be kept in sync - simpleModTest() is merged (the rest of the file remains different) (3.01 KB, patch)
2010-08-05 13:01 EDT, Michael OBrien CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael OBrien CLA 2010-08-04 09:55:12 EDT
>Reproduction, SQL logs and proposed fix will arrive shortly
>Environment: WebLogic 10.3.3 running application managed Derby 10.5.3 client XA adapter (SE derby is OK)
Comment 1 Michael OBrien CLA 2010-08-04 09:57:07 EDT
>Non-regression first time test execution of JUnitCriteriaSimplTestSuite.simpleModTest()
Comment 2 Michael OBrien CLA 2010-08-04 10:33:21 EDT
9968934
Comment 3 Michael OBrien CLA 2010-08-05 11:23:55 EDT
>in txn 5531 by kyuan for Feng Yu the code was modified for Criteria server testing bug# 292160
http://fisheye2.atlassian.com/changelog/eclipselink/?cs=5531

- the problem was than the version of WebLogic it was run on was not JPA 2.0 compatible out of the box (it should have been enabled for JPA 2.0 via an application managed EM) - as a result this test was not run until now
>see
http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#DI_1.1:_Alternative_3:_Application_Level_Shared_Library_-_In_Use

>Line 1544 in SVN rev 5518 becomes 1801 in SVN rev 5531
- we started wrapping the getResultList with transaction code inside a try/catch
Comment 4 Michael OBrien CLA 2010-08-05 12:55:32 EDT
Found it: Wrong package (criteria) instead of (criteria.metamodel)  - but duplicate classnames and nearly duplicate functions (off by 30 lines)
    This fix will likely be that the changes to one of the duplicated test suites should be copied over to the one that was missed in the 3rd party submits. 
org.eclipse.persistence.testing.tests.jpa.criteria.JUnitCriteriaSimpleTestSuite.simpleModTest():1796
org.eclipse.persistence.testing.tests.jpa.criteria.metamodel.JUnitCriteriaSimpleTestSuite.simpleModTest():1766

    Raised bug # 321902 for an overall refactor of other suites as well.
Comment 5 Michael OBrien CLA 2010-08-05 13:01:07 EDT
Created attachment 175962 [details]
Duplicate test classes JUnitCriteriaSimpleTestSuite must be kept in sync - simpleModTest() is merged (the rest of the file remains different)
Comment 6 Michael OBrien CLA 2010-08-05 15:25:09 EDT
>fixed in SVN rev# 7993
http://fisheye2.atlassian.com/changelog/eclipselink/?cs=7993
Comment 7 Michael OBrien CLA 2010-08-10 13:05:37 EDT
>One of the duplicate 2 tests is still failing on server testing
Passes: org.eclipse.persistence.testing.tests.jpa.criteria.JUnitCriteriaSimpleTestSuite.simpleModTest
Fails: org.eclipse.persistence.testing.tests.jpa.criteria.metamodel.JUnitCriteriaSimpleTestSuite.simpleModTest

Since the code is the same for both tests...
>fix: it is either 
1) the test framework is different between the two suites - tx/non-tx related?
2) Modelgen specific related
3) The JPA model is different for the Employee entity for example
Comment 8 Michael OBrien CLA 2010-08-10 13:25:18 EDT
>not currently assigned
Comment 9 Michael OBrien CLA 2010-08-11 15:31:56 EDT
>see possibly related bug# 320399
Comment 10 Michael OBrien CLA 2010-10-26 09:00:47 EDT
>I am not currently assigned this work - it can be done by any developer
Comment 11 Peter Krogh CLA 2010-11-10 11:03:38 EST
Deferring
Comment 12 Martin Grebac CLA 2014-12-10 14:59:50 EST
Older WLS versions.
Comment 13 Eclipse Webmaster CLA 2022-06-09 10:20:03 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink