It is possible that the connections are saved due to the auto-save
feature of the workbench which calls ControlView.saveState(IMemento).
This can happen at any time (e.g. when calling delay()).
When showing the view above ControlView.init(IMemento) is called which
restores saved connections.
The tests require that the ControlView is empty. So we remove all the
connection nodes from the root when initializing the tests.
Change-Id: If94dd42cd3ba4bc3de1ea7bec959cc9117b91582
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/52970
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
fControlView = (ControlView) view;
+ /*
+ * It is possible that the connections are saved due to the
+ * auto-save feature of the workbench which calls
+ * ControlView.saveState(IMemento). This can happen at any
+ * time (e.g. when calling delay()).
+ *
+ * When showing the view above ControlView.init(IMemento) is
+ * called which restores saved connections.
+ *
+ * The tests require that the ControlView is empty. So
+ * we remove all the connection nodes from the root.
+ */
+ fControlView.getTraceControlRoot().removeAllChildren();
+
delay(3000);
fIsInitialized = true;
}