Author: lfryc(a)redhat.com
Date: 2009-12-02 12:55:11 -0500 (Wed, 02 Dec 2009)
New Revision: 16041
Modified:
branches/community/3.3.X/test-applications/selenium-testing-lib/src/main/java/org/jboss/test/selenium/waiting/Wait.java
Log:
- reverted changes in Wait - the changes had influenced widely used abstractTestSource(),
issues needs to be solved first (RF-8177)
Modified:
branches/community/3.3.X/test-applications/selenium-testing-lib/src/main/java/org/jboss/test/selenium/waiting/Wait.java
===================================================================
---
branches/community/3.3.X/test-applications/selenium-testing-lib/src/main/java/org/jboss/test/selenium/waiting/Wait.java 2009-12-02
17:50:16 UTC (rev 16040)
+++
branches/community/3.3.X/test-applications/selenium-testing-lib/src/main/java/org/jboss/test/selenium/waiting/Wait.java 2009-12-02
17:55:11 UTC (rev 16041)
@@ -373,28 +373,8 @@
}
/**
- * <p>Stars loop waiting to satisfy condition.</p>
+ * Stars loop waiting to satisfy condition.
*
- * <p>The condition will be tested</p>
- *
- * <ul>
- * <li>on the start,</li>
- * <li>every time interval after last try</li>
- * <li>and also once after timeout when finishes interval since last try before
timeout.</li>
- * </ul>
- *
- * <p>Scheme:</p>
- *
- * <p><pre>S ..int.. T ..int.. T ..int1..timeout..int2..
L</pre></p>
- *
- * <p>
- * <div>S - starting try</div>
- * <div>T - try within intervals</div>
- * <div>L - last try after timeout</div>
- * <div>int - one interval</div>
- * <div>int = int1 + int2</div>
- * </p>
- *
* @param condition
* what wait for to be satisfied
*/
@@ -402,17 +382,13 @@
long start = System.currentTimeMillis();
long end = start + timeout;
while (System.currentTimeMillis() < end) {
- if (condition.isTrue())
- return;
try {
Thread.sleep(interval);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
- if (System.currentTimeMillis() >= end) {
- if (condition.isTrue())
- return;
- }
+ if (condition.isTrue())
+ return;
}
fail();
}
Show replies by date