Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335669 - Remove LITERALS constant from CDO test models
Summary: Remove LITERALS constant from CDO test models
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Martin Fluegge CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-28 05:16 EST by Martin Fluegge CLA
Modified: 2011-06-23 03:37 EDT (History)
0 users

See Also:
stepper: review+


Attachments
Patch v1 (975.61 KB, patch)
2011-02-17 12:32 EST, Martin Fluegge CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Fluegge CLA 2011-01-28 05:16:21 EST
Accessing the LISTERAL constant in the generated package can lead to trouble because we are using two different implementations (native and legacy). 
Especially if features are compared this could be troublesome. To make sure that developers only use getModelXYZ() methods which deliver the correct package for a given test configuration, LITERALS should be removed.
Comment 1 Martin Fluegge CLA 2011-02-17 12:32:12 EST
Created attachment 189208 [details]
Patch v1

I changed the flag in all models and regenerated. 
Tests are passing except for Bugzilla_305527_Test.testAvoidReferencingDifferentViews().
Since the Mango Package was not correctly prepared for legacy this might indicate a but in legacy. I'd suggest to investigate this issue on a separate bugzilla and skip this test for legacy until this is solved.

Second thing I noticed, is that  org.eclipse.emf.cdo.tests.model5.impl.TestFeatureMapImpl has a changed implementation of getPeople(). 
Is this still correct? Can anyone remember why this was changed. The related legacy class does not change the implementation. 

Beside that everything should be o.k.
Comment 2 Eike Stepper CLA 2011-02-22 07:38:26 EST
Too much to look at it all in detail, but I'm sure that's not necessary. Okay to commit...

Bugzilla_335772_Test has no copyright header and no author comment. Can you fix that on the fly?
Comment 3 Eike Stepper CLA 2011-02-22 07:44:14 EST
Was it intended to create MangoFactory and MangoPackage?
Comment 4 Martin Fluegge CLA 2011-02-22 07:52:47 EST
>Was it intended to create MangoFactory and MangoPackage?

Yes. As I wrote above this was a mistake in the Mango test plug-in ;)
Comment 5 Martin Fluegge CLA 2011-02-22 16:41:13 EST
I fixed the header of Bugzilla_335772_Test and the author tag.
Comment 6 Martin Fluegge CLA 2011-02-22 16:41:28 EST
Committed revision 7179
Comment 7 Martin Fluegge CLA 2011-03-15 05:53:52 EDT
Closed as resolved.
Comment 8 Eike Stepper CLA 2011-06-23 03:37:59 EDT
Available in R20110608-1407