You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by bz...@apache.org on 2015/12/18 01:42:49 UTC
incubator-zeppelin git commit: ZEPPELIN-510: setting max
waitForParagraph to 60s
Repository: incubator-zeppelin
Updated Branches:
refs/heads/master 3debddff5 -> f91b6962b
ZEPPELIN-510: setting max waitForParagraph to 60s
setting max waitForParagraph to 60s + poll every 1s
Author: Prabhjyot Singh <pr...@gmail.com>
Closes #549 from prabhjyotsingh/zeppelin-510-integration-tests-paragraph-dealy and squashes the following commits:
cfb408c [Prabhjyot Singh] ZEPPELIN-510: increase MAX reverting waitForParagraph to 60s + poll every 1s
Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/f91b6962
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/f91b6962
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/f91b6962
Branch: refs/heads/master
Commit: f91b6962b1850acbf27bff8b7f1e13fb00a7b3e7
Parents: 3debddf
Author: Prabhjyot Singh <pr...@gmail.com>
Authored: Thu Dec 17 20:14:54 2015 +0530
Committer: Alexander Bezzubov <bz...@apache.org>
Committed: Fri Dec 18 09:42:36 2015 +0900
----------------------------------------------------------------------
.../src/test/java/org/apache/zeppelin/ZeppelinIT.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/f91b6962/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinIT.java b/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinIT.java
index 47caaa3..2a32c9c 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinIT.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinIT.java
@@ -65,6 +65,7 @@ import com.google.common.base.Function;
public class ZeppelinIT {
private static final Logger LOG = LoggerFactory.getLogger(ZeppelinIT.class);
private static final long MAX_BROWSER_TIMEOUT_SEC = 30;
+ private static final long MAX_PARAGRAPH_TIMEOUT_SEC = 60;
private WebDriver driver;
private void setWebDriver() {
@@ -112,7 +113,7 @@ public class ZeppelinIT {
while (System.currentTimeMillis() - start < 60 * 1000) {
try { // wait for page load
- WebElement element = pollingWait(By.partialLinkText("Create new note"));
+ WebElement element = pollingWait(By.partialLinkText("Create new note"), MAX_BROWSER_TIMEOUT_SEC);
loaded = element.isDisplayed();
break;
} catch (TimeoutException e) {
@@ -149,22 +150,22 @@ public class ZeppelinIT {
boolean waitForParagraph(final int paragraphNo, final String state) {
By locator = By.xpath(getParagraphXPath(paragraphNo)
+ "//div[contains(@class, 'control')]//span[1][contains(.,'" + state + "')]");
- WebElement element = pollingWait(locator);
+ WebElement element = pollingWait(locator, MAX_PARAGRAPH_TIMEOUT_SEC);
return element.isDisplayed();
}
boolean waitForText(final String txt, final By locator) {
try {
- WebElement element = pollingWait(locator);
+ WebElement element = pollingWait(locator, MAX_BROWSER_TIMEOUT_SEC);
return txt.equals(element.getText());
} catch (TimeoutException e) {
return false;
}
}
- public WebElement pollingWait(final By locator) {
+ public WebElement pollingWait(final By locator, final long timeWait) {
Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)
- .withTimeout(MAX_BROWSER_TIMEOUT_SEC, TimeUnit.SECONDS)
+ .withTimeout(timeWait, TimeUnit.SECONDS)
.pollingEvery(1, TimeUnit.SECONDS)
.ignoring(NoSuchElementException.class);