Skip to content

Commit 939dab2

Browse files
committed
Revert insertedCount: 1 requirement for insertOne unified test operation
JAVA-4211
1 parent 150fb07 commit 939dab2

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

driver-core/src/test/resources/unified-test-format/crud/insertOne-dots_and_dollars.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
}
6464
},
6565
"expectResult": {
66-
"insertedCount": 1,
6766
"insertedId": {
6867
"$$unsetOrMatches": 1
6968
}
@@ -166,7 +165,6 @@
166165
}
167166
},
168167
"expectResult": {
169-
"insertedCount": 1,
170168
"insertedId": {
171169
"$$unsetOrMatches": 1
172170
}
@@ -221,7 +219,6 @@
221219
}
222220
},
223221
"expectResult": {
224-
"insertedCount": 1,
225222
"insertedId": {
226223
"$$unsetOrMatches": 1
227224
}
@@ -280,7 +277,6 @@
280277
}
281278
},
282279
"expectResult": {
283-
"insertedCount": 1,
284280
"insertedId": {
285281
"$$unsetOrMatches": 1
286282
}
@@ -390,7 +386,6 @@
390386
}
391387
},
392388
"expectResult": {
393-
"insertedCount": 1,
394389
"insertedId": {
395390
"$$unsetOrMatches": {
396391
"a.b": 1
@@ -501,7 +496,6 @@
501496
}
502497
},
503498
"expectResult": {
504-
"insertedCount": 1,
505499
"insertedId": {
506500
"$$unsetOrMatches": 1
507501
}

driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedCrudHelper.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,7 @@ OperationResult executeInsertOne(final BsonDocument operation) {
529529

530530
private BsonDocument toExpected(final InsertOneResult result) {
531531
if (result.wasAcknowledged()) {
532-
return new BsonDocument("insertedId", result.getInsertedId())
533-
.append("insertedCount", new BsonInt32(1));
532+
return new BsonDocument("insertedId", result.getInsertedId());
534533
} else {
535534
return new BsonDocument();
536535
}

0 commit comments

Comments
 (0)