<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:01:34 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>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-4240] Remove killAllSessions command execution before every test</title>
                <link>https://jira.mongodb.org/browse/JAVA-4240</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;The transaction test runner &lt;a href=&quot;https://github.com/mongodb/specifications/tree/master/source/transactions/tests&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;README&lt;/a&gt; states that:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Running killAllSessions cleans up any open transactions from a previously failed test to prevent the current test from blocking. It is sufficient to run this command once before starting the test suite and once after each failed test.&lt;/p&gt;&lt;/blockquote&gt; 

&lt;p&gt;Currently the driver executes &lt;tt&gt;killAllSessions&lt;/tt&gt; before every single test in the transaction (and others) test suite.  This is unnecessary according to the spec, slows down the test runner a bit, and worse, is also implicated in occasional failed tests against 4.0 sharded clusters.&lt;/p&gt;

&lt;p&gt;Let&apos;s take each of the requirements one by one:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It is sufficient to run this command once before starting the test suite&lt;/p&gt;&lt;/blockquote&gt; 

&lt;p&gt;To implement this, it&apos;s sufficient to do this once at the start of the whole test suite, such as in the static initializer of ClusterFixture.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;and once after each failed test.&lt;/p&gt;&lt;/blockquote&gt; 

&lt;p&gt;I think we can eliminate this.  The reason is because in the cleanup after every test, we close any ClientSession instances that were used by the test, and the close method already aborts any in-progress transactions.&lt;/p&gt;

&lt;p&gt;One could argue that if the test cleanup already aborts all in-progress transactions, it&apos;s not necessary to do this at all even on startup.  But there are a few cases where the per-test cleanup code does not run reliably: &lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;when running tests in the debugger and you hit the stop button&lt;/li&gt;
	&lt;li&gt;when running gradle on the command line and you hit Ctrl-C&lt;/li&gt;
&lt;/ul&gt;

</description>
                <environment></environment>
        <key id="1822691">JAVA-4240</key>
            <summary>Remove killAllSessions command execution before every test</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</priority>
                        <status id="10033" iconUrl="https://jira.mongodb.org/images/icons/statuses/information.png" description="Status for tickets that need to be escalated and unblocked on our team.">Blocked</status>
                    <statusCategory id="4" key="indeterminate" colorName="inprogress"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="jeff.yemin@mongodb.com">Jeffrey Yemin</reporter>
                        <labels>
                    </labels>
                <created>Fri, 16 Jul 2021 18:45:48 +0000</created>
                <updated>Wed, 22 Jun 2022 21:09:12 +0000</updated>
                                                                            <component>Test Runner</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="3947832" author="jeff.yemin" created="Fri, 16 Jul 2021 20:20:04 +0000"  >&lt;p&gt;After talking to &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=shane.harvey&quot; class=&quot;user-hover&quot; rel=&quot;shane.harvey&quot;&gt;shane.harvey&lt;/a&gt; about this, I think we should wait until DRIVERS-1539 is completed before making this change.  I observe that, without that change, whichever test runs &lt;em&gt;after&lt;/em&gt; a test that intentionally leave a transaction open takes over a minute to complete.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hzd4dr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>