Skip to content

Commit

Permalink
Robustified restart of GUI in test by increasing timeout and choosing…
Browse files Browse the repository at this point in the history
… non-language (ok, non-English) specific test.
  • Loading branch information
csrster committed Jan 20, 2016
1 parent 9033d69 commit 9148f88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void restartGUI() {
log.info("Restarting GUI");
testController.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER, "./conf/kill_GUIApplication.sh");
testController.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER, "./conf/start_GUIApplication.sh");
waitForGUIToStart(10);
waitForGUIToStart(120);
} catch (Exception e) {
throw new RuntimeException("Failed to redeploy GUI", e);
}
Expand All @@ -67,7 +67,7 @@ public void waitForGUIToStart(int maxNumberOfSecondsToWait) {
TestEventManager.getInstance().addStimuli("Waiting for GUI to start.");
while (numberOfSecondsToWaiting++ < maxNumberOfSecondsToWait) {
PageHelper.reloadSubPage("HarvestDefinition");
if (PageHelper.getWebDriver().getPageSource().contains("Definitions")) {
if (PageHelper.getWebDriver().getPageSource().contains("Menu")) {
System.out.println();
return;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ private void cleanupGUIConfiguration() {
+ "conf/kill_GUIApplication.sh; "
+ "cp conf/settings_GUIApplication.xml.original conf/settings_GUIApplication.xml; "
+ " conf/start_GUIApplication.sh; " + "fi");
TestGUIController.waitForGUIToStart(10);
TestGUIController.waitForGUIToStart(120);
} catch (Exception e) {
e.printStackTrace();
}
Expand Down

0 comments on commit 9148f88

Please sign in to comment.