Community
Participate
Working Groups
The CompositeTransactionalCommandTest.test_execute_undo_redo JUnit test under-specifies the test criteria for whether an AbstractEMFOperation in a CompositeEMFOperation has been executed, undone, or redone. Currently, it is testing that the composed commands are literally executed, undone, or redone, but not that the changes they effect are actually observed in a test model. With changes implemented for memory scalability problems in the EMFT Transaction API (bug 153908), this JUnit test will fail. Bug 153908 optimizes the recording of EMF changes and undo/redo of CompositeEMFOperations now will not call undo() and redo() on nested AbstractEMFOperations, applying a consolidated ChangeDescription, instead. Thus, a more effective test of whether a composed command was undone/redone is to check that the model changes it made were undone/redone.
Created attachment 49417 [details] Patch to update the test case Attached a patch to rework the TransactionalTestCommand fixture. It now makes a model change when executed, and the assertUndone() and assertRedone() methods check that the model change is not observable or is observable in the model (respectively).
Reviewed and committed the patch.
[GMF Restructure] Bug 319140 : product GMF and component Runtime EMF was the original product and component for this bug