Skip to content

Commit

Permalink
[java] Setting script timeout to zero is nonsense, but default (30 se…
Browse files Browse the repository at this point in the history
…conds) is too long for tests
  • Loading branch information
barancev committed May 2, 2019
1 parent d087505 commit 653da1a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class ExecutingAsyncJavascriptTest extends JUnit4TestBase {
public void setUp() {
assumeTrue(driver instanceof JavascriptExecutor);
executor = (JavascriptExecutor) driver;
driver.manage().timeouts().setScriptTimeout(0, TimeUnit.MILLISECONDS);
driver.manage().timeouts().setScriptTimeout(5000, TimeUnit.MILLISECONDS);
}

@Test
Expand Down Expand Up @@ -202,7 +202,6 @@ public void shouldCatchErrorsWhenExecutingInitialScript() {
@Test
public void shouldNotTimeoutWithMultipleCallsTheFirstOneBeingSynchronous() {
driver.get(pages.ajaxyPage);
driver.manage().timeouts().setScriptTimeout(10, TimeUnit.MILLISECONDS);
assertThat((Boolean) executor.executeAsyncScript("arguments[arguments.length - 1](true);"))
.isTrue();
assertThat((Boolean) executor.executeAsyncScript(
Expand Down

0 comments on commit 653da1a

Please sign in to comment.