GitHub user cloverhearts reopened a pull request:
https://github.com/apache/zeppelin/pull/1047
[ TEST ] Selenium test modified according to Shiro failed the test.
### What is this PR for?
Shiro web test is included as an element of Selenium web test.
However, Shiro test case is to restart the zeppelin server.
As a result, the Selenium test does not work properly.
- Shiro modified to proceed to the last test.
```java
public class AuthenticationIT extends AbstractZeppelinIT {
@BeforeClass
public static void startUp() {
if (!endToEndTestEnabled()) {
return;
}
try {
ZeppelinConfiguration conf = ZeppelinConfiguration.create();
File file = new File(conf.getShiroPath());
originalShiro = StringUtils.join(FileUtils.readLines(file, "UTF-8"),
"\n");
FileUtils.write(file, authShiro, "UTF-8");
} catch (IOException e) {
LOG.error("Error in AuthenticationIT startUp::", e);
}
ZeppelinITUtils.restartZeppelin(); // <---- restart
driver = WebDriverManager.getWebDriver();
}
@AfterClass
public static void tearDown() {
if (!endToEndTestEnabled()) {
return;
}
try {
ZeppelinConfiguration conf = ZeppelinConfiguration.create();
File file = new File(conf.getShiroPath());
FileUtils.write(file, originalShiro, "UTF-8");
} catch (IOException e) {
LOG.error("Error in AuthenticationIT tearDown::", e);
}
ZeppelinITUtils.restartZeppelin(); // <----- restart
driver.quit();
}
}
```
### What type of PR is it?
Bug Fix
### Todos
- [x] added plugin (maven-surefire) in zeppelin-server pom.
- [x] modified class name
(AuthenticationIT.java -> ZeppelinShiroAuthenticationIT.java) -fixed
last test
### How should this be tested?
this is a travis result issue.
### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloverhearts/zeppelin
cifail/selenium-testfailed-via-auth
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zeppelin/pull/1047.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1047
----
commit c0b0dd2aa752f6abed8bed8ddc7bbff66eabb480
Author: CloverHearts <[email protected]>
Date: 2016-06-20T05:18:27Z
Selenium test modified according to Shiro failed the test.
commit cff604eba088a6a32b33bcfa796baba637e0c23e
Author: CloverHearts <[email protected]>
Date: 2016-06-20T06:31:53Z
test import pr 1034
commit 46c1b25e3d1c99d905d5e1bb3e8481b65cdba98b
Author: CloverHearts <[email protected]>
Date: 2016-06-20T06:39:31Z
fix create note xpath
commit dab34fb99dfacc7c5f5cb22b05d06ef79398ac08
Author: CloverHearts <[email protected]>
Date: 2016-06-20T07:58:16Z
test remove auth
commit d12193cd1cbe1f643326627ca85c204f09933098
Author: CloverHearts <[email protected]>
Date: 2016-06-20T08:25:05Z
sleep test
commit 67528b981311bc4ddec8c9595a62f492a20ea0b9
Author: CloverHearts <[email protected]>
Date: 2016-06-20T08:39:09Z
test debug message
commit 70d122471491245b25f2ea7613a7110b48a5bb10
Author: CloverHearts <[email protected]>
Date: 2016-06-20T08:48:17Z
replace ng-controller xpath
commit 3324bea9ca23ddcc211ac84a4396d7efb3817623
Author: CloverHearts <[email protected]>
Date: 2016-06-20T09:37:55Z
add sleep(2)
commit 51b547c50a6f0ed1d55adddaf2167cccd619b8a0
Author: CloverHearts <[email protected]>
Date: 2016-06-20T10:01:49Z
restore mvn and add sleep
commit 4982f8dee654633083214da53454ab90d26fce90
Author: CloverHearts <[email protected]>
Date: 2016-06-20T11:53:21Z
add log
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---