You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by co...@apache.org on 2016/09/21 00:53:03 UTC
zeppelin git commit: ZEPPELIN-1456: Flaky Test: AuthenticationIT
Repository: zeppelin
Updated Branches:
refs/heads/master 9b8421806 -> 1e8559e65
ZEPPELIN-1456: Flaky Test: AuthenticationIT
### What is this PR for?
This started happening after ZEPPELIN-1144, https://github.com/apache/zeppelin/pull/1330.
This test (testGroupPermission) is to validate the group related permission on a notebook.
### What type of PR is it?
[Bug Fix]
### Todos
* [ ] - Fix CI
### What is the Jira issue?
* [ZEPPELIN-1456](https://issues.apache.org/jira/browse/ZEPPELIN-1456)
### How should this be tested?
CI xxx.10 (selenium) should be green
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? n/a
* Is there breaking changes for older versions? n/a
* Does this needs documentation? n/a
Author: Prabhjyot Singh <pr...@gmail.com>
Closes #1444 from prabhjyotsingh/ZEPPELIN-1456 and squashes the following commits:
3c81587 [Prabhjyot Singh] ZEPPELIN-1456: fix
Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/1e8559e6
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/1e8559e6
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/1e8559e6
Branch: refs/heads/master
Commit: 1e8559e6518529a869b22422b8b6bc28aad1c3b9
Parents: 9b84218
Author: Prabhjyot Singh <pr...@gmail.com>
Authored: Tue Sep 20 14:53:08 2016 +0530
Committer: Damien CORNEAU <co...@gmail.com>
Committed: Wed Sep 21 09:52:50 2016 +0900
----------------------------------------------------------------------
.../zeppelin/integration/AuthenticationIT.java | 25 ++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1e8559e6/zeppelin-server/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
index ea3f363..6001429 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
@@ -36,6 +36,7 @@ import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
+import java.net.URI;
import java.util.List;
@@ -176,8 +177,16 @@ public class AuthenticationIT extends AbstractZeppelinIT {
authenticationIT.logoutUser("finance1");
authenticationIT.authenticationUser("hr1", "hr1");
- pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
- MAX_BROWSER_TIMEOUT_SEC).click();
+ try {
+ WebElement element = pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
+ MAX_BROWSER_TIMEOUT_SEC);
+ collector.checkThat("Check is user has permission to view this notebook link", false,
+ CoreMatchers.equalTo(element.isDisplayed()));
+ } catch (Exception e) {
+ //This should have failed, nothing to worry.
+ }
+
+ driver.get(new URI(driver.getCurrentUrl()).resolve("/#/notebook/" + noteId).toString());
List<WebElement> privilegesModal = driver.findElements(
By.xpath("//div[@class='modal-content']//div[@class='bootstrap-dialog-header']" +
@@ -190,8 +199,16 @@ public class AuthenticationIT extends AbstractZeppelinIT {
authenticationIT.logoutUser("hr1");
authenticationIT.authenticationUser("finance2", "finance2");
- pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
- MAX_BROWSER_TIMEOUT_SEC).click();
+ try {
+ WebElement element = pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
+ MAX_BROWSER_TIMEOUT_SEC);
+ collector.checkThat("Check is user has permission to view this notebook link", false,
+ CoreMatchers.equalTo(element.isDisplayed()));
+ } catch (Exception e) {
+ //This should have failed, nothing to worry.
+ }
+
+ driver.get(new URI(driver.getCurrentUrl()).resolve("/#/notebook/" + noteId).toString());
privilegesModal = driver.findElements(
By.xpath("//div[@class='modal-content']//div[@class='bootstrap-dialog-header']" +