Skip to content

Conversation

@prabhjyotsingh
Copy link
Contributor

What is this PR for?

This is a fix for selenium test case testSparkInterpreterDependencyLoading that does not check for endToEndTestEnabled causing build to fail on local. (mvn $TEST_FLAG $PROFILE -B)

Used to get this error in file ./zeppelin-server/target/failsafe-reports/org.apache.zeppelin.ZeppelinIT.txt

-------------------------------------------------------------------------------
Test set: org.apache.zeppelin.ZeppelinIT
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.008 sec <<< FAILURE! - in org.apache.zeppelin.ZeppelinIT
testSparkInterpreterDependencyLoading(org.apache.zeppelin.ZeppelinIT)  Time elapsed: 0.008 sec      <<< ERROR!
java.lang.NullPointerException: null
    at org.apache.zeppelin.ZeppelinIT.testSparkInterpreterDependencyLoading(ZeppelinIT.java:210)

What type of PR is it?

Hot Fix

Todos

  • - Fix for testSparkInterpreterDependencyLoading
  • - delete created notebook for cleanup.

Is there a relevant Jira issue?

N/A

How should this be tested?

mvn $TEST_FLAG $PROFILE -B should not fail on local when env variable "CI" is not set.

testDepRemoveBtn.click();
driver.findElement(By.xpath("//button[contains(.,'Save')]")).submit();
driver.switchTo().alert().accept();
} catch (ElementNotVisibleException e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would there be any other error? like xpath returning no match (say the element has been removed)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, what you say make sense, let me change all other catch from ElementNotVisibleException to just Exception, so, it catches every thing in #706

@felixcheung
Copy link
Member

I think it's fine keeping this in #706 - either way is ok with me.
Much easier to see diff this way: https://github.com/apache/incubator-zeppelin/pull/709/files?w=1

@prabhjyotsingh
Copy link
Contributor Author

Yes, agreed, this is much cleaner.

@prabhjyotsingh prabhjyotsingh force-pushed the ZEPPELIN-630-SeleniumFix branch from 73e6334 to 2642975 Compare February 10, 2016 17:30
@prabhjyotsingh
Copy link
Contributor Author

@felixcheung have replaced all "ElementNotVisibleException" to "Exception", and then log the same.

@felixcheung
Copy link
Member

looks good.

} catch (Exception e) {
LOG.error("Exception in ZeppelinIT while testSparkInterpreterDependencyLoading ", e);
File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we throw e after taking screenshot, if getting exception is considered as a test failure?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure did the relevant change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to just throw e - exception stack should already have the test name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @felixcheung, made the required change.

@prabhjyotsingh prabhjyotsingh force-pushed the ZEPPELIN-630-SeleniumFix branch from 35ae3c9 to c60858d Compare February 12, 2016 03:51
@prabhjyotsingh prabhjyotsingh force-pushed the ZEPPELIN-630-SeleniumFix branch from c60858d to 2d9aa98 Compare February 12, 2016 05:05
@prabhjyotsingh
Copy link
Contributor Author

@felixcheung @Leemoonsoo Thanks for the review. I have addressed the comment.

LOG.error("Exception in ZeppelinIT while testAngularDisplay ", e);
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);

throw new Exception(e);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it!!! missed it. Thank you. :)

@felixcheung
Copy link
Member

looks good, thanks.
merging if no more comments.

@Leemoonsoo
Copy link
Member

LGTM

@asfgit asfgit closed this in 72b8fde Feb 14, 2016
prabhjyotsingh added a commit to prabhjyotsingh/zeppelin that referenced this pull request Feb 16, 2016
asfgit pushed a commit that referenced this pull request Feb 21, 2016
### What is this PR for?
Test functionality of spark, pyspark, sparksql

### What type of PR is it?
Improvement

### Todos
* [x] - Selenium for spark
* [x] - Selenium for pyspark
* [x] - Selenium for sparksql
* [x] - refactor with #619

### Is there a relevant Jira issue?
ZEPPELIN-587

### How should this be tested?
On macOS

    PATH=~/Applications/Firefox.app/Contents/MacOS/:$PATH CI="" \
    mvn -Dtest=org.apache.zeppelin.integration.TestSparkParagraph -Denforcer.skip=true \
    test -pl zeppelin-server

Author: Prabhjyot Singh <prabhjyotsingh@gmail.com>

Closes #654 from prabhjyotsingh/ZEPPELIN-587 and squashes the following commits:

8f24695 [Prabhjyot Singh] use handleException in all other test cases remove test for spark 1.1.1 more meaningful log message
28dfc55 [Prabhjyot Singh] thorwong exception similar to #709
21bcc45 [Prabhjyot Singh] Merge remote-tracking branch 'origin/master' into ZEPPELIN-587
b05b81b [Prabhjyot Singh] have SHIFT_ENTER enum
9a206f4 [Prabhjyot Singh] add missing endToEndTestEnabled check for testSparkInterpreterDependencyLoading
ab03287 [Prabhjyot Singh] have static import of AbstractZeppelinIT.HelperKeys.*, and rg.openqa.selenium.Keys.*
5187a16 [Prabhjyot Singh] check if spark version is less than 1.3 then don't append ".toDF()"
6927f7e [Prabhjyot Singh] CI FIX
9236e3c [Prabhjyot Singh] implemeting @bzz review comments
2c28758 [Prabhjyot Singh] missed refactor with #619
d49344f [Prabhjyot Singh] selenium test spark, pyspark and sparkSql
@prabhjyotsingh prabhjyotsingh deleted the ZEPPELIN-630-SeleniumFix branch February 24, 2016 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants