Skip to content

Use majority concern for all change stream test collections #1375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 9, 2025

Conversation

eramongodb
Copy link
Contributor

@eramongodb eramongodb commented Apr 8, 2025

Followup to #1367.

Attempt to resolve more flaky task failures:

change_streams.cpp:388: FAILED: std::distance(stream.begin(), stream.end()) == 1 for: 0 == 1
change_streams.cpp:594: FAILED: one != x.end() for: {?} != {?}

Assuming these are due to the tests not consistently using majority write concern for their operations, as is the case for the prose test that was the focus of the previous PR:

Change streams only notify on data changes that have persisted to a majority of data-bearing members in the replica set.

This PR adds a make_test_coll helper function which drops, creates, and sets concern levels for the collection to be watched and operated on.

@eramongodb eramongodb self-assigned this Apr 8, 2025
@eramongodb eramongodb requested a review from kevinAlbs April 9, 2025 14:32
@eramongodb eramongodb merged commit a50c2f6 into mongodb:master Apr 9, 2025
16 of 20 checks passed
@eramongodb eramongodb deleted the cxx-change_streams branch April 9, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants