Author: ldimaggio
Date: 2012-05-21 20:46:30 -0400 (Mon, 21 May 2012)
New Revision: 41226
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/pom.xml
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java
Log:
Extended timeout to 2 hours in pom.xml, refactored some code in code in
ESBExampleTest.java - console switching
Modified: trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/pom.xml
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/pom.xml 2012-05-21 21:24:37 UTC (rev
41225)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/pom.xml 2012-05-22 00:46:30 UTC (rev
41226)
@@ -29,7 +29,7 @@
<skip>${swtbot.test.skip}</skip>
<testSuite>org.jboss.tools.esb.ui.bot.test</testSuite>
<testClass>org.jboss.tools.esb.ui.bot.tests.ESBAllBotTests</testClass>
- <forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds>
+ <forkedProcessTimeoutInSeconds>7200</forkedProcessTimeoutInSeconds>
</configuration>
</plugin>
</plugins>
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java 2012-05-21
21:24:37 UTC (rev 41225)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java 2012-05-22
00:46:30 UTC (rev 41226)
@@ -113,17 +113,19 @@
}
//console.switchConsole(configuredState.getServer().name);
- //String text2 = console.getConsoleText(TIME_5S, TIME_20S, false);
- String text2 = console.getConsoleText(TIME_5S, TIME_30S, false); /*
https://issues.jboss.org/browse/JBQA-5838 - ldimaggi */
- log.info("text2 = " + text2);
- //console.clearConsole();
-
- if (text2.length() == 0) {
- return null;
- }
- else {
- return text2;
- }
+// //String text2 = console.getConsoleText(TIME_5S, TIME_20S, false);
+// String text2 = console.getConsoleText(TIME_5S, TIME_30S, false); /*
https://issues.jboss.org/browse/JBQA-5838 - ldimaggi */
+// log.info("text2 = " + text2);
+// //console.clearConsole();
+//
+// if (text2.length() == 0) {
+// return null;
+// }
+// else {
+// return text2;
+// }
+ String returnString = consoleWaiting();
+ return returnString;
}
@@ -157,6 +159,38 @@
// }
// return text2.substring(text.length());
+// // New - the consoles fail to switch....sometimes
+// boolean consoleSwitched = false;
+// int switchLimit = 30;
+// int switchCounter = 0;
+// consoleSwitched = console.switchConsole(configuredState.getServer().name);
+// while (!consoleSwitched) {
+// consoleSwitched = console.switchConsole(configuredState.getServer().name);
+// bot.sleep(Timing.time10S());
+// log.error("Console did not switch - retrying.");
+// if (switchCounter++ > switchLimit) {
+// break;
+// }
+// }
+// //console.switchConsole(configuredState.getServer().name);
+//
+// //String text2 = console.getConsoleText(TIME_5S, TIME_20S, false);
+// String text2 = console.getConsoleText(TIME_5S, TIME_30S, false); /*
https://issues.jboss.org/browse/JBQA-5838 - ldimaggi */
+// log.info("text2 = " + text2);
+// //console.clearConsole();
+//
+// if (text2.length() == 0) {
+// return null;
+// }
+// else {
+// return text2;
+// }
+ String returnString = consoleWaiting();
+ return returnString;
+ }
+
+
+ protected String consoleWaiting () {
// New - the consoles fail to switch....sometimes
boolean consoleSwitched = false;
int switchLimit = 30;
@@ -171,19 +205,19 @@
}
}
//console.switchConsole(configuredState.getServer().name);
-
+
//String text2 = console.getConsoleText(TIME_5S, TIME_20S, false);
String text2 = console.getConsoleText(TIME_5S, TIME_30S, false); /*
https://issues.jboss.org/browse/JBQA-5838 - ldimaggi */
log.info("text2 = " + text2);
//console.clearConsole();
-
+
if (text2.length() == 0) {
return null;
}
else {
return text2;
}
- }
+ }