Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318347 - [Legacy] Bugzilla_316887_Test fails in Legacy scenario
Summary: [Legacy] Bugzilla_316887_Test fails in Legacy scenario
Status: CLOSED WORKSFORME
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.legacy (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Martin Fluegge CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on: 316887 324950
Blocks:
  Show dependency tree
 
Reported: 2010-06-29 11:46 EDT by Eike Stepper CLA
Modified: 2012-06-19 07:08 EDT (History)
1 user (show)

See Also:


Attachments
Patch v1 (2.61 KB, patch)
2010-06-30 08:34 EDT, 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 Eike Stepper CLA 2010-06-29 11:46:41 EDT
Martin, can you please have a look at this test case: 
Bugzilla_316887_Test.testResolveConflictWithAdjustedNotifcations()

It appears after the modifications of bug 316887.
Comment 1 Martin Fluegge CLA 2010-06-30 08:34:38 EDT
Created attachment 173082 [details]
Patch v1


There was indeed a bug in the legacy adapter. The root of the problem was that detached objects a still in the view and so the legacy wrapper read out an unattached object which made the commit fail. This is solved now.

There also was a small mistake in the test itself. Due to the nature of legacy the feature delta did not only contain a remove delta, but also a delta for the SET operation which was invoked when the container of the removed object was set to null. This led to a ClassCastException because the wrong FeatureDelta was casted to CDORemoveFeatureDelta. This is also fixed in the test.

I attached both changes.
Comment 2 Martin Fluegge CLA 2010-06-30 08:35:04 EDT
Sure ;)

There was indeed a bug in the legacy adapter. The root of the problem was that detached objects a still in the view and so the legacy wrapper read out an unattached object which made the commit fail. This is solved now.

There also was a small mistake in the test itself. Due to the nature of legacy the feature delta did not only contain a remove delta, but also also a delta for the SET action which was invoked when the container of the removed object was set to null. This lead to a ClassCastException because the wrong FeatureDelta was casted to CDORemoveFeatureDelta. This is also fixed in the test.

I attached both changes.
Comment 3 Eike Stepper CLA 2010-06-30 09:33:37 EDT
Martin, Please let us discuss the bug while looking at your fix together...
Comment 4 Martin Fluegge CLA 2010-06-30 10:31:51 EDT
O.k. I'm here. Just ping me...
Comment 5 Martin Fluegge CLA 2010-06-30 15:51:32 EDT
Just as a reminder for us two:

As conclusion to out discussion the test case itself seems to be not correct. The rollback in the conflict resolver seems to be complete wrong because rolling back the object (TaskContainer) leads to a new ordered tasks list (changed by the other transaction). If the merger now proceeds with the local change (remove of objects 2) the wrong object will be replaced. 

Thus the patch seems to fix a bug which would not occur if the conflict resolvers would work correctly. So we decided to postpone this until we clarified who the complete conflict resolving mechanism of CDO can be changed/enhanced.
Comment 6 Eike Stepper CLA 2010-07-02 10:43:09 EDT
The test has been excluded from the suite.