<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:15:40 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[NETCONF-695] Rpc future doesn&apos;t complete when transformer fails</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-695</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;When netconf message transformer fails to parse reply(e.g. because of &lt;a href=&quot;https://jira.opendaylight.org/browse/NETCONF-645&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.opendaylight.org/browse/NETCONF-645&lt;/a&gt;), result future is stuck and never completes.&lt;/p&gt;

&lt;p&gt;Following test proves the problem. It can be pasted to org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpcTest.&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
@Test
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; void testDeadlock() &lt;span class=&quot;code-keyword&quot;&gt;throws&lt;/span&gt; Exception {
    &lt;span class=&quot;code-comment&quot;&gt;// when rpc is successful, but transformer fails &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; some reason
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; MessageTransformer&amp;lt;NetconfMessage&amp;gt; failingTransformer = mock(MessageTransformer.class);
    &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; RemoteDeviceCommunicator&amp;lt;NetconfMessage&amp;gt; communicatorMock = mock(RemoteDeviceCommunicator.class);
    &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; NetconfMessage msg = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
    &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; RpcResult&amp;lt;NetconfMessage&amp;gt; result = RpcResultBuilder.success(msg).build();
    when(communicatorMock.sendRequest(any(), any())).thenReturn(Futures.immediateFuture(result));
    when(failingTransformer.toRpcResult(any(), any())).thenThrow(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; RuntimeException(&lt;span class=&quot;code-quote&quot;&gt;&quot;FAIL&quot;&lt;/span&gt;));
    &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; NetconfDeviceRpc rpc = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; NetconfDeviceRpc(SCHEMA_CONTEXT, communicatorMock, failingTransformer);
    &lt;span class=&quot;code-comment&quot;&gt;// then guava logs and swallow exception and &lt;span class=&quot;code-keyword&quot;&gt;future&lt;/span&gt; never completes
&lt;/span&gt;    rpc.invokeRpc(path, &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;).get();
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="32696">NETCONF-695</key>
            <summary>Rpc future doesn&apos;t complete when transformer fails</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="jluhrsen">Jamo Luhrsen</assignee>
                                    <reporter username="andmak">Andrej Mak</reporter>
                        <labels>
                    </labels>
                <created>Thu, 28 May 2020 10:08:51 +0000</created>
                <updated>Tue, 16 Jun 2020 07:55:27 +0000</updated>
                            <resolved>Tue, 16 Jun 2020 07:55:27 +0000</resolved>
                                    <version>Aluminium</version>
                                    <fixVersion>Aluminium</fixVersion>
                    <fixVersion>Magnesium SR2</fixVersion>
                                    <component>netconf</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="68171" author="jluhrsen" created="Thu, 4 Jun 2020 00:25:40 +0000"  >&lt;p&gt;a basic try to address this is &lt;a href=&quot;https://git.opendaylight.org/gerrit/c/netconf/+/90237&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I welcome review comments to get it right. The UT given in this JIRA is part of the patch and passes&lt;br/&gt;
 now as the future returns with an exception when it&apos;s given the bad transformer.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                                                <inwardlinks description="is blocked by">
                                        <issuelink>
            <issuekey id="32586">NETCONF-666</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03snr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>