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

Bug 318347

Summary: [Legacy] Bugzilla_316887_Test fails in Legacy scenario
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: cdo.legacyAssignee: Martin Fluegge <martin.fluegge>
Status: CLOSED WORKSFORME QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: martin.fluegge
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 316887, 324950    
Bug Blocks:    
Attachments:
Description Flags
Patch v1 none

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.