Skip to content

Commit 2c7fb15

Browse files
authored
CSHARP-5530: Revise assertion for unacknowledged client bulkWrite result (#1662)
1 parent cb2fac8 commit 2c7fb15

File tree

4 files changed

+38
-41
lines changed

4 files changed

+38
-41
lines changed

Diff for: specifications/command-logging-and-monitoring/tests/monitoring/unacknowledged-client-bulkWrite.json

+28-23
Original file line numberDiff line numberDiff line change
@@ -95,29 +95,34 @@
9595
"ordered": false
9696
},
9797
"expectResult": {
98-
"insertedCount": {
99-
"$$unsetOrMatches": 0
100-
},
101-
"upsertedCount": {
102-
"$$unsetOrMatches": 0
103-
},
104-
"matchedCount": {
105-
"$$unsetOrMatches": 0
106-
},
107-
"modifiedCount": {
108-
"$$unsetOrMatches": 0
109-
},
110-
"deletedCount": {
111-
"$$unsetOrMatches": 0
112-
},
113-
"insertResults": {
114-
"$$unsetOrMatches": {}
115-
},
116-
"updateResults": {
117-
"$$unsetOrMatches": {}
118-
},
119-
"deleteResults": {
120-
"$$unsetOrMatches": {}
98+
"$$unsetOrMatches": {
99+
"acknowledged": {
100+
"$$unsetOrMatches": false
101+
},
102+
"insertedCount": {
103+
"$$unsetOrMatches": 0
104+
},
105+
"upsertedCount": {
106+
"$$unsetOrMatches": 0
107+
},
108+
"matchedCount": {
109+
"$$unsetOrMatches": 0
110+
},
111+
"modifiedCount": {
112+
"$$unsetOrMatches": 0
113+
},
114+
"deletedCount": {
115+
"$$unsetOrMatches": 0
116+
},
117+
"insertResults": {
118+
"$$unsetOrMatches": {}
119+
},
120+
"updateResults": {
121+
"$$unsetOrMatches": {}
122+
},
123+
"deleteResults": {
124+
"$$unsetOrMatches": {}
125+
}
121126
}
122127
}
123128
},

Diff for: specifications/command-logging-and-monitoring/tests/monitoring/unacknowledged-client-bulkWrite.yml

+10-16
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,16 @@ tests:
5252
update: { $set: { x: 333 } }
5353
ordered: false
5454
expectResult:
55-
insertedCount:
56-
$$unsetOrMatches: 0
57-
upsertedCount:
58-
$$unsetOrMatches: 0
59-
matchedCount:
60-
$$unsetOrMatches: 0
61-
modifiedCount:
62-
$$unsetOrMatches: 0
63-
deletedCount:
64-
$$unsetOrMatches: 0
65-
insertResults:
66-
$$unsetOrMatches: {}
67-
updateResults:
68-
$$unsetOrMatches: {}
69-
deleteResults:
70-
$$unsetOrMatches: {}
55+
$$unsetOrMatches:
56+
acknowledged: { $$unsetOrMatches: false }
57+
insertedCount: { $$unsetOrMatches: 0 }
58+
upsertedCount: { $$unsetOrMatches: 0 }
59+
matchedCount: { $$unsetOrMatches: 0 }
60+
modifiedCount: { $$unsetOrMatches: 0 }
61+
deletedCount: { $$unsetOrMatches: 0 }
62+
insertResults: { $$unsetOrMatches: {} }
63+
updateResults: { $$unsetOrMatches: {} }
64+
deleteResults: { $$unsetOrMatches: {} }
7165
# Force completion of the w:0 write by executing a find on the same connection
7266
- object: *collection
7367
name: find

Diff for: tests/MongoDB.Driver.Tests/UnifiedTestOperations/Matchers/UnifiedValueMatcher.cs

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
using FluentAssertions;
2020
using MongoDB.Bson;
2121
using MongoDB.Bson.IO;
22-
using MongoDB.Driver;
2322
using MongoDB.TestHelpers.XunitExtensions;
2423
using Xunit.Sdk;
2524

Diff for: tests/MongoDB.Driver.Tests/UnifiedTestOperations/UnifiedClientBulkWriteOperation.cs

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
using System.Linq;
1919
using System.Threading;
2020
using System.Threading.Tasks;
21-
using FluentAssertions;
2221
using MongoDB.Bson;
2322

2423
namespace MongoDB.Driver.Tests.UnifiedTestOperations

0 commit comments

Comments
 (0)