geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r790718 - /geronimo/server/trunk/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcesTest.java
Date Thu, 02 Jul 2009 19:34:13 GMT
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;
+    }
+
 }



Mime
View raw message