Author: ldimaggio
Date: 2012-10-05 12:58:19 -0400 (Fri, 05 Oct 2012)
New Revision: 44343
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/Editing.java
Log:
Added generalized method for actions and listeners to deal with random cases of editor not
being active
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/Editing.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/Editing.java 2012-10-05
16:44:00 UTC (rev 44342)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/Editing.java 2012-10-05
16:58:19 UTC (rev 44343)
@@ -123,9 +123,12 @@
@Test
public void listeners() {
+ /* Add service is failing on Jenkins -
https://issues.jboss.org/browse/JBQA-7100
+ * This problem appeared in the firt week of Oct. 2012 - and is only seen when the
+ * test is run on Jenkins - as a workaround - the editor is saved/shown - ldimaggi */
SWTBotEditor editor = getEditor();
- log.error("Listeners Editor is active = " + editor.isActive());
-
+ getEditorActive(editor, "Listeners");
+
String service = "aaa";
addService(service);
List<String> listenerList = getAvailableListeners(service);
@@ -169,14 +172,7 @@
* This problem appeared in the firt week of Oct. 2012 - and is only seen when the
* test is run on Jenkins - as a workaround - the editor is saved/shown - ldimaggi */
SWTBotEditor editor = getEditor();
- if (!editor.isActive()) {
- log.error("Actions Editor is active? = " + editor.isActive());
- bot.sleep(30000l);
- log.error(editor.getTitle());
- editor.save();
- editor.show();
- log.error("Actions Editor is active? = " + editor.isActive());
- }
+ getEditorActive(editor, "Actions");
addService(service);
String[] actionPath = new String[] { configFileFull, node_services,
@@ -216,6 +212,20 @@
}
}
+
+ /* Add service is failing on Jenkins -
https://issues.jboss.org/browse/JBQA-7100
+ * This problem appeared in the firt week of Oct. 2012 - and is only seen when the
+ * test is run on Jenkins - as a workaround - the editor is saved/shown - ldimaggi */
+ public void getEditorActive (SWTBotEditor theEditor, String taskType) {
+ if (!theEditor.isActive()) {
+ log.error(taskType + " Editor is active? = " + theEditor.isActive());
+ bot.sleep(30000l);
+ log.error(theEditor.getTitle());
+ theEditor.save();
+ theEditor.show();
+ log.error(taskType + " Editor is active? = " + theEditor.isActive());
+ }
+ }
private SWTBotEditor getEditor() {
bot.sleep(TIME_5S);