summaryrefslogtreecommitdiffstats
path: root/uitest-common
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2016-09-09 14:54:43 +0300
committerArtur Signell <artur@vaadin.com>2016-09-09 14:57:26 +0300
commit4ee640120878974fedff271691700cad3d198547 (patch)
treee01c81eb45ee025b1cc22bdbcf1f20016b64ccec /uitest-common
parent61aff6078ce7fda5aba4c423ae6f78c4e3fd8cab (diff)
downloadvaadin-framework-4ee640120878974fedff271691700cad3d198547.tar.gz
vaadin-framework-4ee640120878974fedff271691700cad3d198547.zip
Make sleep in tests throw RuntimeException to avoid try catches
Change-Id: I7ef3cca8271ae9f725d8530793543253c216e6bc
Diffstat (limited to 'uitest-common')
-rw-r--r--uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java
index dbfda17bfd..4985bc7e93 100644
--- a/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java
+++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java
@@ -786,12 +786,15 @@ public abstract class AbstractTB3Test extends ParallelTest {
*
* @param timeoutMillis
* Number of ms to wait
- * @throws InterruptedException
*/
- protected void sleep(int timeoutMillis) throws InterruptedException {
+ protected void sleep(int timeoutMillis) {
while (timeoutMillis > 0) {
int d = Math.min(BROWSER_TIMEOUT_IN_MS, timeoutMillis);
- Thread.sleep(d);
+ try {
+ Thread.sleep(d);
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
timeoutMillis -= d;
// Do something to keep the connection alive