Skip to content

Commit

Permalink
DRIVERS-2877: Follow w: 0 write with a find in spec tests
Browse files Browse the repository at this point in the history
This will force completion of the w: 0 write, which addresses
a TCP-based race condition in the tests
  • Loading branch information
jyemin committed Apr 1, 2024
1 parent bbb335e commit c22f594
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,18 @@ tests:
object: *collection
arguments:
document: { _id: 2 }
# Force completion of the w: 0 write by executing a find on the same connection
- name: find
object: *collection
arguments:
filter: { }
expectResult: [
{ _id: 1 },
{ _id: 2 }
]
expectLogMessages:
- client: *client
ignoreExtraMessages: true
messages:
- level: debug
component: command
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,18 @@ tests:
- insertOne:
document: { _id: "unorderedBulkWriteInsertW0", x: 44 }
ordered: false
# Force completion of the w: 0 write by executing a find on the same connection
- name: find
object: *collection
arguments:
filter: { }
expectResult: [
{ _id: 1, x: 11 },
{ _id: "unorderedBulkWriteInsertW0", x: 44 }
]
expectEvents:
- client: *client
ignoreExtraEvents: true
events:
- commandStartedEvent:
command:
Expand Down

0 comments on commit c22f594

Please sign in to comment.