Change-Id: I7ef3cca8271ae9f725d8530793543253c216e6bctags/8.0.0.alpha2
@@ -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 |
@@ -267,10 +267,7 @@ public class ComboBoxSelectingWithNewItemsAllowedTest extends MultiBrowserTest { | |||
private void assertInitialItemCount() { | |||
// wait for a bit in case the count is updating | |||
try { | |||
sleep(1000); | |||
} catch (InterruptedException ignore) { | |||
} | |||
sleep(1000); | |||
assertThat("Wrong initial item count.", labelElement.getText(), | |||
is("2600")); | |||
} |
@@ -81,10 +81,7 @@ public class PanelRemoveShortcutListenerTest extends MultiBrowserTest { | |||
attemptShortcut("A on"); | |||
// add a bit more delay to make sure the caption doesn't change later | |||
try { | |||
sleep(2000); | |||
} catch (InterruptedException ignore) { | |||
} | |||
sleep(2000); | |||
assertThat(panel.findElement(By.className("v-panel-caption")) | |||
.findElement(By.tagName("span")).getText(), is("A on")); |
@@ -49,15 +49,6 @@ public class ExpandingContainerVisibleRowRaceConditionTest | |||
assertScrollPositionIsNotVisible(); | |||
} | |||
@Override | |||
protected void sleep(int milliseconds) { | |||
try { | |||
super.sleep(milliseconds); | |||
} catch (InterruptedException e) { | |||
e.printStackTrace(); | |||
} | |||
} | |||
private void assertFirstRowIdIs(String expected) { | |||
List<WebElement> cellsOfFirstColumn = getCellsOfFirstColumn(); | |||
WebElement first = cellsOfFirstColumn.get(0); |
@@ -93,10 +93,7 @@ public class ModalWindowFocusTest extends MultiBrowserTest { | |||
private void pressEscAndWait() { | |||
new Actions(driver).sendKeys(Keys.ESCAPE).build().perform(); | |||
try { | |||
sleep(100); | |||
} catch (InterruptedException e) { | |||
} | |||
sleep(100); | |||
} | |||
} |
@@ -48,10 +48,6 @@ public class AppResource404Test extends MultiBrowserTest { | |||
protected void disableWaitingAndWait() { | |||
testBench().disableWaitForVaadin(); | |||
try { | |||
sleep(500); | |||
} catch (InterruptedException e) { | |||
e.printStackTrace(); | |||
} | |||
sleep(500); | |||
} | |||
} |
@@ -87,10 +87,7 @@ public abstract class MultiBrowserTestWithProxy extends MultiBrowserTest { | |||
createProxy(getProxyPort()); | |||
break; | |||
} catch (JSchException e) { | |||
try { | |||
sleep(500); | |||
} catch (InterruptedException e1) { | |||
} | |||
sleep(500); | |||
if (i == 9) { | |||
throw new RuntimeException( | |||
"All 10 attempts to connect a proxy failed", e); |