[ 
https://issues.apache.org/jira/browse/RATIS-303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16605535#comment-16605535
 ] 

Shashikant Banerjee commented on RATIS-303:
-------------------------------------------

Thanks [~szetszwo], for the review. patch v1 moves 
TestRaftStateMachineException tests to ratis-server and adds the subclasses for 
the rpcs.

...Could you describe how the patch fix NullPointerException? 

The Null pointer exception was caused because in the TestStateMachine, a fake 
exception is thrown during preAppendTransaction. This leads to leader stepping 
down so subsequent client call with leader set to null fails with null pointer 
exception. Since the single cluster instance was shared among all the tests , 
leader being set to null intermittently lead to the failure of other tests as 
well.

The exception is addressed by waiting for the leader to come up and sending the 
next request to the proper leader after the stateMachine exception is thrown in 
testRetryOnExceptionDuringReplication.

> TestRaftStateMachineException is failing with NullPointerException
> ------------------------------------------------------------------
>
>                 Key: RATIS-303
>                 URL: https://issues.apache.org/jira/browse/RATIS-303
>             Project: Ratis
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 0.3.0
>            Reporter: Mukul Kumar Singh
>            Assignee: Shashikant Banerjee
>            Priority: Major
>              Labels: ozone
>             Fix For: 0.3.0
>
>         Attachments: RATIS-303.02.patch
>
>
> TestRaftStateMachineException is failing with the following exception
> {code}
> [ERROR] 
> testRetryOnExceptionDuringReplication[2](org.apache.ratis.statemachine.TestRaftStateMachineException)
>   Time elapsed: 0.001 s  <<< ERROR!
> java.lang.NullPointerException
>       at 
> org.apache.ratis.statemachine.TestRaftStateMachineException.testRetryOnExceptionDuringReplication(TestRaftStateMachineException.java:139)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to