runzhiwang opened a new pull request #83: URL: https://github.com/apache/incubator-ratis/pull/83
Why WatchRequestTests.testWatchRequestClientTimeout failed. The test try to watch a log index which will never be committed, so client can not receive reply, and connection closed throw AlreadyClosedException, trigger TimeoutIOException. But when throw AlreadyClosedException, suggested new leader is null, because connection has been closed, so RaftClientImpl::handleIOException will [random select](https://github.com/apache/incubator-ratis/blob/master/ratis-client/src/main/java/org/apache/ratis/client/impl/RaftClientImpl.java#L418) a new leader, so it maybe sometimes throw NotLeaderException rather than TimeoutIOException.  ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
