-
Bug
-
Resolution: Done
-
Medium
-
Aluminium
-
None
When netconf message transformer fails to parse reply(e.g. because of https://jira.opendaylight.org/browse/NETCONF-645), result future is stuck and never completes.
Following test proves the problem. It can be pasted to org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpcTest.
@Test public void testDeadlock() throws Exception { // when rpc is successful, but transformer fails for some reason final MessageTransformer<NetconfMessage> failingTransformer = mock(MessageTransformer.class); final RemoteDeviceCommunicator<NetconfMessage> communicatorMock = mock(RemoteDeviceCommunicator.class); final NetconfMessage msg = null; final RpcResult<NetconfMessage> result = RpcResultBuilder.success(msg).build(); when(communicatorMock.sendRequest(any(), any())).thenReturn(Futures.immediateFuture(result)); when(failingTransformer.toRpcResult(any(), any())).thenThrow(new RuntimeException("FAIL")); final NetconfDeviceRpc rpc = new NetconfDeviceRpc(SCHEMA_CONTEXT, communicatorMock, failingTransformer); // then guava logs and swallow exception and future never completes rpc.invokeRpc(path, null).get(); }
- is blocked by
-
NETCONF-666 500 response without provided rpc failure details
- Resolved