[
https://issues.apache.org/jira/browse/HADOOP-8218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239682#comment-13239682
]
Aaron T. Myers commented on HADOOP-8218:
----------------------------------------
Here's another option I'd like to put forth:
Change back RPC.stopProxy to *not* throw an exception in the event the proxy or
invocation handler doesn't implement Closeable. Add some tests that
RPC.stopProxy does indeed correctly call close() on proxies or invocation
handlers which do implement Closeable. This should ensure that RPC.stopProxy
doesn't ever inadvertently regress so as to fail to stop a Closeable proxy, and
still allows for mock objects to mock out IPC interfaces without having to jump
through any hoops.
Thoughts?
> RPC.closeProxy shouldn't throw error when closing a mock
> --------------------------------------------------------
>
> Key: HADOOP-8218
> URL: https://issues.apache.org/jira/browse/HADOOP-8218
> Project: Hadoop Common
> Issue Type: Bug
> Components: ipc, test
> Affects Versions: 0.24.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Critical
> Attachments: hadoop-8218.txt, hadoop-8218.txt
>
>
> HADOOP-8202 changed the behavior of RPC.stopProxy() to throw an exception if
> called on an object which doesn't implement Closeable. Unfortunately, we use
> mock objects in many test cases, and those mocks don't implement Closeable.
> This is causing TestZKFailoverController to fail in trunk, for example.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira