<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:38:46 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>[SFC-149] Race condition in test SfcIpv4PacketInHandlerTest.pktInPurgeBuffering</title>
                <link>https://jira.opendaylight.org/browse/SFC-149</link>
                <project id="10167" key="SFC">sfc</project>
                    <description>&lt;p&gt;There is a road condition in the mentioned test pckInPurgeBuffering that is making the test unstable (e.g. of one failed execution at &lt;a href=&quot;https://jenkins.opendaylight.org/releng/job/sfc-verify-boron/jdk=openjdk8,nodes=dynamic_verify/166/console):&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://jenkins.opendaylight.org/releng/job/sfc-verify-boron/jdk=openjdk8,nodes=dynamic_verify/166/console):&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.054 sec &amp;lt;&amp;lt;&amp;lt; FAILURE! - in org.opendaylight.sfc.ofrenderer.SfcIpv4PacketInHandlerTest&lt;br/&gt;
pktInPurgeBuffering(org.opendaylight.sfc.ofrenderer.SfcIpv4PacketInHandlerTest)  Time elapsed: 0.02 sec  &amp;lt;&amp;lt;&amp;lt; FAILURE!&lt;br/&gt;
org.mockito.exceptions.verification.WantedButNotInvoked: &lt;br/&gt;
Wanted but not invoked:&lt;br/&gt;
sfcOfFlowProgrammerImpl.setFlowRspId(&amp;lt;any&amp;gt;);&lt;br/&gt;
-&amp;gt; at org.opendaylight.sfc.ofrenderer.SfcIpv4PacketInHandlerTest.pktInPurgeBuffering(SfcIpv4PacketInHandlerTest.java:138)&lt;/p&gt;

&lt;p&gt;This test verifies purging after timeout in the packetIn handler in charge of creating temporary rules in the PathMapperACL table. The problem: in the test, 1ms timeout is setted in the handler: &lt;/p&gt;

&lt;p&gt;this.pktInHandler.setMaxBufferTime(1); // 1 microsecond&lt;/p&gt;

&lt;p&gt;The comment is incorrect: time unit is not usecs, but millis (in packetInHandler, that value is compared vs System.currentTimeMillis for determining the purge): &lt;/p&gt;

&lt;p&gt;if((currentMillis - bufferedTime.longValue()) &amp;gt; maxBufferTime) &lt;/p&gt;

&lt;p&gt;Later in the test: &lt;/p&gt;

&lt;p&gt;// When called again, the purgeCount will be exceeded, the buffer will&lt;br/&gt;
// be flushed, and this packet will be added back, making a size of 1&lt;br/&gt;
Thread.sleep(1); // sleep 1 millisecond, to let the buffer time expire&lt;/p&gt;

&lt;p&gt;As stated, waiting exactly 1 milisecond (== exactly the timeout time) is the road condition. The test should be corrected in order to use a value higher enough (i.e. 10 millis) than the timeout so the buffer time is always exceeded. The incorrect &quot;microseconds&quot; comment should also be corrected&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="24175">SFC-149</key>
            <summary>Race condition in test SfcIpv4PacketInHandlerTest.pktInPurgeBuffering</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <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="diego.jesus.granados.lopez@ericsson.com">Diego Granados</assignee>
                                    <reporter username="diego.jesus.granados.lopez@ericsson.com">Diego Granados</reporter>
                        <labels>
                    </labels>
                <created>Thu, 16 Jun 2016 07:00:03 +0000</created>
                <updated>Fri, 24 Jun 2016 11:52:19 +0000</updated>
                            <resolved>Fri, 24 Jun 2016 11:52:19 +0000</resolved>
                                    <version>unspecified</version>
                                                    <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="46668" author="diego.jesus.granados.lopez@ericsson.com" created="Thu, 16 Jun 2016 07:03:46 +0000"  >&lt;p&gt;Just checked and the road condition is also present in pktInBufferingTimeout method. That should also be corrected, together with other comments uncorrectly commenting time units used in the test&lt;/p&gt;</comment>
                    </comments>
                    <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_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6072</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=6072]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Bug]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10309"><![CDATA[Boron]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02fcv:</customfieldvalue>

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