Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 401069

Summary: Rewriting WDF test TestSequence.testAllocSize
Product: z_Archived Reporter: Sabine Heider <sabine.heider>
Component: EclipselinkAssignee: Tom Ware <tom.ware>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: submitted_patch
Bug Depends on:    
Bug Blocks: 383862    

Description Sabine Heider CLA 2013-02-18 06:10:04 EST
The test org.eclipse.persistence.testing.tests.wdf.jpa1.generator.TestSequence.testAllocSize fails because it makes assumptions on implementation details of JPA provider which are not valid with EclipseLink. I rewrote the test in a way that the idea of the test is retained.

The test used to be skipped on Oracle and MaxDB. I enabled it again for both platforms. However, I don't have Oracle server for testing at hand, so I don't know whether that really works. Please let me know if you encounter problems on Oracle.

I added a skip for server environments because I think the new logic (creating a second entity manager) would probably fail there. But again, I don't have an application server environment at hand for testing. If the skip annotation doesn't work for whatever reason, please let me know as well.

(Link to the github contribution will follow.)
Comment 1 Sabine Heider CLA 2013-02-18 06:41:59 EST
I made a github contribution for the change and created a pull request:

https://github.com/sabineheider/eclipselink.runtime/commit/b720c1e991658d6be461d1f47851c982b8bd0cc6
Comment 2 Sabine Heider CLA 2013-02-27 10:41:50 EST
I assert that I:
- authored 100% the content I am contributing
- have the rights to donate the content to Eclipse
- contribute the content under the EPL
Comment 3 Tom Ware CLA 2013-02-27 14:05:10 EST
Checked fix into master.

Reviewed by: Tom Ware reviewed user submitted fix

Tested with JPA and Core LRG
HANA testing done by contributor
Comment 4 Sabine Heider CLA 2013-02-28 04:48:54 EST
Commit 98e20c53bc6c6eaedac04c7ead8b8696d13d0787
Comment 5 Sabine Heider CLA 2013-02-28 18:37:38 EST
The change caused a failure on MySQL. The test is actually supposed to be skipped on MySQL, but the skip mechanism failed (due to my attempt to skip the test both in a server environment and for certain databases).

I fixed the test runner so that it can handle this case.

Github contribution:
https://github.com/sabineheider/eclipselink.runtime/commit/28123de6556a0c4fab8cdd6a7cab30555611990e

I assert that I:
- authored 100% the content I am contributing
- have the rights to donate the content to Eclipse
- contribute the content under the EPL
Comment 6 Sabine Heider CLA 2013-03-01 04:02:32 EST
There is still a bug in the skip logic. I will prepare another patch to fix that today. Maybe you want to wait for it so that you can apply and test both commits at once?
Sorry for the inconvenience.
Comment 7 Sabine Heider CLA 2013-03-01 06:59:05 EST
I gave up changing the skip logic because of too many side effects.
Please forget the change from comment 5 and use the following one instead:

https://github.com/sabineheider/eclipselink.runtime/commit/50f6f045b53998ee0186fb053cfe1e36f786c1a5

I assert that I:
- authored 100% the content I am contributing
- have the rights to donate the content to Eclipse
- contribute the content under the EPL
Comment 8 Sabine Heider CLA 2013-03-01 07:05:36 EST
Tested the WDF test suite with MySQL - okay.
Comment 9 Tom Ware CLA 2013-03-01 11:25:13 EST
CHhecked in new fix: 50a2e589deb1113c7f075e9ebe8220630c0c801a
Comment 10 Eclipse Webmaster CLA 2022-06-09 10:10:57 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink