diff options
author | Artur Signell <artur@vaadin.com> | 2016-09-09 14:54:43 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2016-09-09 14:57:26 +0300 |
commit | 4ee640120878974fedff271691700cad3d198547 (patch) | |
tree | e01c81eb45ee025b1cc22bdbcf1f20016b64ccec /uitest-common | |
parent | 61aff6078ce7fda5aba4c423ae6f78c4e3fd8cab (diff) | |
download | vaadin-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.java | 9 |
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 |