diff --git a/test/command_logging/unacknowledged-write.json b/test/command_logging/unacknowledged-write.json index 21e247df6..dad0c0a36 100644 --- a/test/command_logging/unacknowledged-write.json +++ b/test/command_logging/unacknowledged-write.json @@ -1,6 +1,6 @@ { "description": "unacknowledged-write", - "schemaVersion": "1.13", + "schemaVersion": "1.16", "createEntities": [ { "client": { @@ -53,11 +53,27 @@ "_id": 2 } } + }, + { + "name": "find", + "object": "collection", + "arguments": { + "filter": {} + }, + "expectResult": [ + { + "_id": 1 + }, + { + "_id": 2 + } + ] } ], "expectLogMessages": [ { "client": "client", + "ignoreExtraMessages": true, "messages": [ { "level": "debug", diff --git a/test/command_monitoring/unacknowledgedBulkWrite.json b/test/command_monitoring/unacknowledgedBulkWrite.json index 4c16d6df1..782cb84a5 100644 --- a/test/command_monitoring/unacknowledgedBulkWrite.json +++ b/test/command_monitoring/unacknowledgedBulkWrite.json @@ -1,6 +1,6 @@ { "description": "unacknowledgedBulkWrite", - "schemaVersion": "1.0", + "schemaVersion": "1.7", "createEntities": [ { "client": { @@ -64,11 +64,29 @@ ], "ordered": false } + }, + { + "name": "find", + "object": "collection", + "arguments": { + "filter": {} + }, + "expectResult": [ + { + "_id": 1, + "x": 11 + }, + { + "_id": "unorderedBulkWriteInsertW0", + "x": 44 + } + ] } ], "expectEvents": [ { "client": "client", + "ignoreExtraEvents": true, "events": [ { "commandStartedEvent": { diff --git a/test/unified_format.py b/test/unified_format.py index 0a76f8c72..c31f646af 100644 --- a/test/unified_format.py +++ b/test/unified_format.py @@ -1788,6 +1788,8 @@ class UnifiedSpecTestMixinV1(IntegrationTest): clientid = self.entity_map[client["client"]]._topology_settings._topology_id actual_logs = formatted_logs[clientid] actual_logs = [log for log in actual_logs if log["component"] in components] + if client.get("ignoreExtraMessages", False): + actual_logs = actual_logs[: len(client["messages"])] self.assertEqual(len(client["messages"]), len(actual_logs)) for expected_msg, actual_msg in zip(client["messages"], actual_logs): expected_data, actual_data = expected_msg.pop("data"), actual_msg.pop("data")