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

ASF GitHub Bot commented on HADOOP-18803:
-----------------------------------------

teamconfx opened a new pull request, #6075:
URL: https://github.com/apache/hadoop/pull/6075

   ### Description of PR
   https://issues.apache.org/jira/browse/HADOOP-18803
   This PR adds an extra setting of protocol engine to ensure that when running 
the test by itself the test would not fail due to wrong conf.
   
   ### How was this patch tested?
   Run `TestRPC#testWrappedStopProxy` and the test passes by itself.
   
   ### For code changes:
   
   - [x] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   




> ClassCastException in test TestRPC#testWrappedStopProxy
> -------------------------------------------------------
>
>                 Key: HADOOP-18803
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18803
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: common, ipc
>            Reporter: ConfX
>            Priority: Critical
>         Attachments: reproduce.sh
>
>
> h2. What happened:
> In HCommon, test TestRPC#testWrappedStopProxy tries to cast 
> org.apache.hadoop.ipc.WritableRpcEngine$Invoker to 
> org.apache.hadoop.ipc.TestRPC$StoppedInvocationHandler and causes 
> ClassCastException.
> h2. Buggy code:
> In TestRPC.java:
> {code:java}
> @Test
> public void testWrappedStopProxy() throws IOException {
>   StoppedProtocol wrappedProxy = RPC.getProxy(StoppedProtocol.class,
>       StoppedProtocol.versionID, null, conf);
>   StoppedInvocationHandler invocationHandler = (StoppedInvocationHandler)    
> // <--- Here causes ClassCastException
>       Proxy.getInvocationHandler(wrappedProxy);
>   ...
> } {code}
> h2. How to reproduce:
> (1) Just directly run test TestRPC#testWrappedStopProxy.
> You can use the reproduce.sh in the attachment to easily reproduce the bug.
> We are happy to provide a patch if this issue is confirmed. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to