Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[papyrus-rt-dev] Failure in Compare Tests: Protocol Move Change

Hi, Team,

For some while now, a test in the Papyrus-RT Compare tests has been failing in the nightly builds:

org.eclipse.papyrusrt.umlrt.tooling.compare.internal.UMLRTProtocolChangeTest.testMergeSingleProtocolMoveInTwoWayLeftToRight 

It has been bothering me because it is the last remaining test failure in my inheritance branch builds.  đŸ˜‰

The test fails on the last assertion, which requires that after the merge, there must be no differences.  However, there is a difference:  the «protocolContainer» stereotype was unapplied from the protocol-container package that was moved because it was deemed no longer to be applicable.

Debugging into, I find something strange:  at the time the protocol-container package is attached to its new parent package by the merger, the protocol-container’s stereotype application traces to the UML-RT profile loaded in the “left” resource set, but the profile that is actually applied to the model in which the merge happens is loaded in the “right” resource set.  Consequently, the UML API thinks that the profile defining the stereotype is not applied (they are two distinct copies of the same profile) and so it destroys the stereotype application, which results in the changes being detected that fail the test.

The weirder part is, if in debugging the UML API’s determination of inapplicable stereotypes (ElementOperations::unapplyAllNonApplicableStereotypes) I unwind the stack frame to try again, on the second try, the stereotype is found to be applicable and the test proceeds to pass.

Any idea what could have changed in the EMF Compare framework to cause this test failure?  And is somebody looking into it?  This will block any attempts to merge Gerrits into the Tooling component.

Thanks,

Christian

Back to the top