GitHub user AlexanderShoshin opened a pull request:

    https://github.com/apache/zeppelin/pull/2206

    [ZEPPELIN-1856] Flaky Test: 
InterpreterRestApiTest.testRestartInterpreterPerNote

    ### What is this PR for?
    A _NullPointerException_ occurs occasionally in 
`InterpreterRestApiTest.testRestartInterpreterPerNote()` test when 
`p.getResult()` returns _null_ in the following line of test method:
    ```
    assertEquals(p.getResult().message().get(0).getData(), 
getSimulatedMarkdownResult("markdown"));
    ```
    It happens when we recieve an _OUTPUT_UPDATE_ALL_ event in 
_RemoteInterpreterEventPoller_ after `RemoteInterpreter.interpret(..)` is done. 
The `Paragraph.result` which already contains its final value is setted to 
_null_ by `NotebookServer.onOutputClear(..)` method. As a result we recieve a 
_NPE_ in assertion.
    
    ### What type of PR is it?
    Bug Fix
    
    ### Todos
    * [ ] - To fix this issue we need to ignore an _OUTPUT_UPDATE_ALL_ event 
after job is finished.
    
    ### What is the Jira issue?
    [ZEPPELIN-1856](https://issues.apache.org/jira/browse/ZEPPELIN-1856)
    
    ### 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/AlexanderShoshin/zeppelin ZEPPELIN-1856

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/2206.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 #2206
    
----
commit bcf01bd999fc853e08058a77443153338f85c5d4
Author: Alexander Shoshin <alexander_shos...@epam.com>
Date:   2017-03-24T13:27:35Z

    do not clear a paragraph output if the paragraph is already done

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to