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

Bug 315714

Summary: JPA: CacheImplJUnitTest requires cross-model testSetup) additions for metamodel1,cacheable and fetchgroups test models when run out of order
Product: z_Archived Reporter: Michael OBrien <michael.f.obrien>
Component: EclipselinkAssignee: Michael OBrien <michael.f.obrien>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: eclipselink.orm-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
URL: http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/cache_api#Refactor_20100322
Whiteboard:
Bug Depends on: 248780    
Bug Blocks:    
Attachments:
Description Flags
testSetup() requires schema generators for AdvancedFetchGroup, Cacheable and Metamodel none

Description Michael OBrien CLA 2010-06-04 00:46:41 EDT
>Running the JPA test suite in ANT is OK
>Running the cache suite first in the "testing browser JPA" will fail on missing tables

    Looks like test ordering (Since I recently added the advanced.fetchgroups model to the existing advamced model (both "default1") and the existing "metamodel1" model in the Cache tests without modifying setup() - I was relying on the metamodel1 setup() running first.  I don't know why "default1" doesn't load pads and chest_protector though.
    - local ant OK
    - build server ant OK
    - Testing browser individual suites in order OK
    - Testing browser running cache tests before fetchgroups or metamodel = ERROR - I need to fix setup()
    - Testing Browser (JPA) root (all tests) possibly broken due to ordering - but I don't see it (I am going to clean my schema)

>If i go on a separate machine in a clean view and run on Derby on a new schema - the Cache tests first in the testing browser - I get the missing tables
Internal Exception: java.sql.SQLSyntaxErrorException: Table/View 'JPA_HOCKEY_GEAR' does not exist.
Internal Exception: java.sql.SQLSyntaxErrorException: Table/View 'CMP3_MM_BOARD_SEQ' does not exist.
Comment 1 Michael OBrien CLA 2010-06-04 01:07:17 EDT
>part 1 of 2 - disable 10 new tests until setup() is fixed for non-ant use
see SVN rev# 7482
http://fisheye2.atlassian.com/changelog/eclipselink/?cs=7482
Comment 2 Michael OBrien CLA 2010-06-04 01:28:40 EDT
>the following highlighted 3 additional model table creators are required AdvancedFetchGroup, Cachable and Metamodel

public void testSetup() {
    new AdvancedTableCreator().replaceTables(JUnitTestCase.getServerSession());
>    new AdvancedFetchGroupTableCreator().replaceTables(JUnitTestCase.getServerSession());
>    new CacheableTableCreator().replaceTables(JUnitTestCase.getServerSession());
>    // 315714: metamodel model requires a table creator now that we are persisting with it
        clearCache();
    }
Comment 3 Michael OBrien CLA 2010-06-04 01:31:47 EDT
Created attachment 171065 [details]
testSetup() requires schema generators for AdvancedFetchGroup, Cacheable and Metamodel
Comment 4 Michael OBrien CLA 2010-06-04 07:15:49 EDT
>original rev# that added the cross model dependency
http://fisheye2.atlassian.com/changelog/eclipselink/?cs=7461
Comment 5 Michael OBrien CLA 2010-06-04 07:50:36 EDT
>test results on the patch adding the 2 replaceTables
- on a clean view
- run testing browser JPA
- login to new derby schema
jdbc:derby:test2;create=true

- run specific advanced suite first
TEST MODEL NAME: (JUnit test): CacheImplJUnitTest
Errors: (failures): 0
Fatal Errors: (errors): 0
Passed: 15
Total Tests: 15
Comment 6 Michael OBrien CLA 2010-06-04 10:27:58 EDT
>see SVN rev# 7486 containing above patch
http://fisheye2.atlassian.com/changelog/eclipselink/?cs=7486
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:09:18 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 8 Eclipse Webmaster CLA 2022-06-09 10:17:07 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink