Skip to content

Commit

Permalink
Deflaking tests
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Tolfsen <[email protected]>
  • Loading branch information
sevaseva authored and andreastt committed Apr 11, 2014
1 parent 0a8d2b0 commit 8edf63c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions java/client/test/org/openqa/selenium/PageLoadingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ public void testShouldTimeoutIfAPageTakesTooLongToLoad() {

start = System.currentTimeMillis();
driver.get(pages.xhtmlTestPage);
assertThat(driver.getTitle(), equalTo("XHTML Test Page"));
wait.until(titleIs("XHTML Test Page"));
end = System.currentTimeMillis();
duration = (int) (end - start);
assertThat(duration, lessThan(2000));
Expand Down Expand Up @@ -478,7 +478,7 @@ public void testShouldTimeoutIfAPageTakesTooLongToRefresh() {

start = System.currentTimeMillis();
driver.get(pages.xhtmlTestPage);
assertThat(driver.getTitle(), equalTo("XHTML Test Page"));
wait.until(titleIs("XHTML Test Page"));
end = System.currentTimeMillis();
duration = (int) (end - start);
assertThat(duration, lessThan(2000));
Expand Down
4 changes: 3 additions & 1 deletion javascript/atoms/test/click_link_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,10 @@
asyncTestCase = goog.testing.AsyncTestCase.createAndInstall();
// Android needs a longer timeout due to emulator slowness.
// Opera 12, IE9+, Firefox 10 are sometimes slow to load new iframe pages.
if (goog.userAgent.product.ANDROID || bot.userAgent.IE_DOC_9) {
if (goog.userAgent.product.ANDROID) {
asyncTestCase.stepTimeout = 5000;
} else if (bot.userAgent.IE_DOC_9) {
asyncTestCase.stepTimeout = 50000;
} else if ((goog.userAgent.product.OPERA &&
bot.userAgent.isEngineVersion(12)) ||
(goog.userAgent.GECKO &&
Expand Down

0 comments on commit 8edf63c

Please sign in to comment.