<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:16:57 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>[CDRIVER-3029] Add additional tests for mongoc_database_aggregate</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-3029</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2899&quot; title=&quot;Add a database aggregate helper&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2899&quot;&gt;&lt;del&gt;CDRIVER-2899&lt;/del&gt;&lt;/a&gt; incorporates CRUD tests and a mock server test for read/write concern inheritance, but we&apos;d do well to add additional tests for &lt;tt&gt;mongoc_database_aggregate()&lt;/tt&gt;. These can be ported over from existing collection tests (and adapted to use OP_MSG) where it makes sense. Some ideas:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;batchSize and/or bypassDocumentValidation options&lt;/li&gt;
	&lt;li&gt;read preference inheritance, and overriding to primary on $out&lt;/li&gt;
	&lt;li&gt;behavior for invalid read preferences&lt;/li&gt;
	&lt;li&gt;serverId selection&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Since both helpers use common code in &lt;tt&gt;mongoc-aggregate.c&lt;/tt&gt;, read preference inheritance is probably the most useful test case. It may also make more sense to repurpose this ticket to extract many of the current collection tests to a new &lt;tt&gt;test-mongoc-aggregate.c&lt;/tt&gt; file. Then the database and collection test files can only concern themselves with inheritance.&lt;/p&gt;
</description>
                <environment></environment>
        <key id="719526">CDRIVER-3029</key>
            <summary>Add additional tests for mongoc_database_aggregate</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                    </labels>
                <created>Tue, 19 Mar 2019 23:27:12 +0000</created>
                <updated>Thu, 31 Mar 2022 13:40:22 +0000</updated>
                                                                            <component>libmongoc</component>
                    <component>tests</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="2186123" author="kevin.albertson" created="Wed, 20 Mar 2019 14:41:54 +0000"  >&lt;p&gt;Also &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/blob/a3e3f079a1c5f04fbbe10ec54ce3ba30593a7bf1/src/libmongoc/tests/test-mongoc-opts.c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;test-mongoc-opts.c&lt;/a&gt; already has the logic in place to easily test read preference inheritance. We should update that file to include &lt;tt&gt;mongoc_database_aggregate&lt;/tt&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10020">
                    <name>Gantt Dependency</name>
                                                                <inwardlinks description="has to be done after">
                                        <issuelink>
            <issuekey id="647701">CDRIVER-2899</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>CDRIVER-2733</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr6lu7:</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>