-
Notifications
You must be signed in to change notification settings - Fork 2.8k
ZEPPELIN-1477. Add Integration Test for LivyInterpreter #1462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@Leemoonsoo @prabhjyotsingh @felixcheung Please help review, the failed test is irrelevant, I have created ZEPPELIN-1498 for it. |
|
is there a way we could avoid checking in jar? that would make release a bit trickier? |
|
I am afraid this is the only workaround for now. Because these jars are not available in maven repository. |
|
I have asked the livy community to publish these artifacts, suppose I can delete these livy artifacts in zeppelin after livy 0.3 is released. |
|
reping @Leemoonsoo @prabhjyotsingh @bzz @jongyoul @felixcheung please help review. |
|
I too share same thought as @felixcheung, if we can avoid jar(s), can we use |
|
@prabhjyotsingh These jars are not available in public maven repository. Do you have any better ideas ? |
|
Any thought about using |
|
@prabhjyotsingh I dont' get it. This is integration test where I will launch a real livy server, how can I use mockito to simulate that ? |
|
What I mean to say was, lets mock these till the time we get livy's jar from public repo, how do you think about that ? |
|
mockit is for unit test, not for system test. It is just like AbstractTestRestApi where we will launch real spark cluster and ZeppelinServer. Using mockit can not cover lots of cases in real enviroment (e.g. how can I test livy handle comment correctly (considering we are doing some preprocessing), how can I test SparkContext is shared correctly between %livy.spark and %livy.sql) . I know committing jars are not good practise, but these jars won't be available in public repository in short time. |
|
Yes, that part I agree, it cannot be tested without jar, @Leemoonsoo @jongyoul @felixcheung any thought about checking in jar(s) ? |
|
As I have stated, I think these tests are good to have but worry about the added complicity for a source release having these jars in the "source", especially since these jars are not from an ASF project. |
|
Livy interpreter is not a trivial interpreter although it use rest api. The current unit test is not sufficient to guarantee the quality of livy interpreter. I have found some issues there, but before doing improvement and fix, I would like to commit this integration test, otherwise I have to manually test it after each fix and refactor. I know committing jars is not a good practise, but this is the only workaround I can think of. |
|
@felixcheung @prabhjyotsingh I have published livy jars to OSSRH, and now I removed the livy jars. Please help review. |
|
I just tried it on my local; so basically it skips all the test cases (unless yes i provide LIVY_HOME, and SPARK_HOME). Any plan for this to merge with travis ? |
|
As mentioned in the PR description, for now you need to export SPARK_HOME and LIVY_HOME. I plan to merge with travis in the following PR. |
|
Otherwise yes, LGTM! |
|
One question - I'm not sure if dependencies for test only code should be listed in LICENSE. |
|
@felixcheung I think it is not necessary as I didn't find junit in https://github.com/apache/zeppelin/blob/master/zeppelin-distribution/src/bin_license/LICENSE |
|
Ok, I will wait a day and merge if no other thought on this.
|
### What is this PR for? This PR fix several issues of LivyInterpeter test. * Livy interpreter's test code is not in the right place, so it never runs. * LivyHelperTest would fail. * No Integration test for LivyInterpreter so any following change is not easy to be tested. This PR would fix the above issues. Regarding the integration test, some of livy's artifact is not available in repository, so I have to copy them to livy/local-maven-repo as local repository. And LivyInterperter's integration test require spark and livy to be installed. For now you have to download spark and livy manually. Please use spark 1.5.x and livy 0.2 which is currently supported. Download livy 0.2.0 from here [https://github.com/cloudera/livy/releases](https://github.com/cloudera/livy/releases) And use the following command to execute the LivyIntegrationTest. ``` export SPARK_HOME=<path_to_spark> export LIVY_HOME=<path_to_livy> mvn clean package -pl 'livy' -Dtest=LivyIntegrationTest ``` If you hit any issues, you can check logs under `livy/target/tmp`. ### What type of PR is it? [Bug Fix | Improvement] ### Todos * [ ] - Task ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-1477 ### Screenshots (if appropriate)  ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Jeff Zhang <[email protected]> Closes apache#1462 from zjffdu/ZEPPELIN-1477 and squashes the following commits: 75914b9 [Jeff Zhang] remove livy local jars fee61f9 [Jeff Zhang] add more test 1b9fbbc [Jeff Zhang] add missing dependencies e8ceff5 [Jeff Zhang] add missing livy jars 8632466 [Jeff Zhang] fix rat check f560a92 [Jeff Zhang] ZEPPELIN-1477. Add Integration Test for LivyInterpreter
### What is this PR for? This PR fix several issues of LivyInterpeter test. * Livy interpreter's test code is not in the right place, so it never runs. * LivyHelperTest would fail. * No Integration test for LivyInterpreter so any following change is not easy to be tested. This PR would fix the above issues. Regarding the integration test, some of livy's artifact is not available in repository, so I have to copy them to livy/local-maven-repo as local repository. And LivyInterperter's integration test require spark and livy to be installed. For now you have to download spark and livy manually. Please use spark 1.5.x and livy 0.2 which is currently supported. Download livy 0.2.0 from here [https://github.com/cloudera/livy/releases](https://github.com/cloudera/livy/releases) And use the following command to execute the LivyIntegrationTest. ``` export SPARK_HOME=<path_to_spark> export LIVY_HOME=<path_to_livy> mvn clean package -pl 'livy' -Dtest=LivyIntegrationTest ``` If you hit any issues, you can check logs under `livy/target/tmp`. ### What type of PR is it? [Bug Fix | Improvement] ### Todos * [ ] - Task ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-1477 ### Screenshots (if appropriate)  ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Jeff Zhang <[email protected]> Closes apache#1462 from zjffdu/ZEPPELIN-1477 and squashes the following commits: 75914b9 [Jeff Zhang] remove livy local jars fee61f9 [Jeff Zhang] add more test 1b9fbbc [Jeff Zhang] add missing dependencies e8ceff5 [Jeff Zhang] add missing livy jars 8632466 [Jeff Zhang] fix rat check f560a92 [Jeff Zhang] ZEPPELIN-1477. Add Integration Test for LivyInterpreter
What is this PR for?
This PR fix several issues of LivyInterpeter test.
This PR would fix the above issues. Regarding the integration test, some of livy's artifact is not available in repository, so I have to copy them to livy/local-maven-repo as local repository. And LivyInterperter's integration test require spark and livy to be installed. For now you have to download spark and livy manually. Please use spark 1.5.x and livy 0.2 which is currently supported. Download livy 0.2.0 from here https://github.com/cloudera/livy/releases
And use the following command to execute the LivyIntegrationTest.
If you hit any issues, you can check logs under
livy/target/tmp.What type of PR is it?
[Bug Fix | Improvement]
Todos
What is the Jira issue?
Screenshots (if appropriate)
Questions: