You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ga...@apache.org on 2009/07/02 21:34:13 UTC
svn commit: r790718 -
/geronimo/server/trunk/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcesTest.java
Author: gawor
Date: Thu Jul 2 19:34:13 2009
New Revision: 790718
URL: http://svn.apache.org/viewvc?rev=790718&view=rev
Log:
poll instead of waiting
Modified:
geronimo/server/trunk/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcesTest.java
Modified: geronimo/server/trunk/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcesTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcesTest.java?rev=790718&r1=790717&r2=790718&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcesTest.java (original)
+++ geronimo/server/trunk/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcesTest.java Thu Jul 2 19:34:13 2009
@@ -56,11 +56,22 @@
selenium.click("link=J2EE Connectors");
waitForPageLoad();
selenium.click("link=Uninstall");
- Thread.sleep(45 * 1000);
+ assertTrue("timed out waiting for button", waitForButton());
selenium.click("dijit_form_Button_0");
waitForPageLoad();
selenium.click("link=JMS Resources");
waitForPageLoad();
assertFalse(selenium.isTextPresent("UniqueName (console.jms/UniqueName/1.0/rar)"));
}
+
+ private boolean waitForButton() throws InterruptedException {
+ for (int i = 0; i < 10; i++) {
+ if (selenium.isElementPresent("dijit_form_Button_0")) {
+ return true;
+ }
+ Thread.sleep(10 * 1000);
+ }
+ return false;
+ }
+
}