mongodb / specifications

Specifications related to MongoDB
http://specifications.readthedocs.io/en/latest
Other
389 stars 242 forks source link

DRIVERS-2761 do not apply `readConcern` or `writeConcern` to search index commands #1474

Closed kevinAlbs closed 10 months ago

kevinAlbs commented 11 months ago

Summary

Tests were run in the C++ driver in this PR: https://github.com/mongodb/mongo-cxx-driver/pull/1055

Background & Motivation

This PR proposes adding tests to ensure each search index command does not include readConcern or writeConcern.

Unit tests apply a non-default readConcern and writeConcern to the collection:

# Set a non-default read and write concern.
uriOptions:
    readConcernLevel: local
    w: 1

Unit tests verify the command started event is checked:

# Expect no writeConcern or readConcern to be sent.
writeConcern: { $$exists: false }
readConcern: { $$exists: false }

The integration test is as an extra precaution to test against a live Atlas instance.

The C++ driver failed unit and integration tests prior to fixes applied in https://github.com/mongodb/mongo-cxx-driver/pull/1055.


Please complete the following before merging: