[Build Failure] TestBsonSizeBatches.test_06_insert_fails_over_16MiB

XMLWordPrintableJSON

    • Type: Build Failure
    • Resolution: Done
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: greenerbuild
    • None
    • 🔵 Done
    • Python Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Name of Failure:

      test_encryption.TestBsonSizeBatches.test_06_insert_fails_over_16MiB

      Link to task:

      https://spruce.mongodb.com/task/mongo_python_driver_encryption_rhel8_test_non_standard_latest_python3.14_auth_ssl_sharded_cluster_cffb9069fd7b82b80e3a3f131ccd4d730e36e3f4_25_08_27_12_30_56/tests?execution=0&sorts=STATUS%3AASC

      Context of when and why the failure occurred:

      Seems to have been caused by a change in latest server.

      Stack trace:

      [2025/08/28 07:14:59.074] FAILURE: AssertionError: 2 != 10334 ()
      [2025/08/28 07:14:59.074] self = <test.asynchronous.test_encryption.TestBsonSizeBatches testMethod=test_06_insert_fails_over_16MiB>
      [2025/08/28 07:14:59.074]     async def test_06_insert_fails_over_16MiB(self):
      [2025/08/28 07:14:59.074]         limits_doc = json_data("limits", "limits-doc.json")
      [2025/08/28 07:14:59.074]         doc = {"_id": "encryption_exceeds_16mib", "unencrypted": "a" * (_16_MiB - 2000)}
      [2025/08/28 07:14:59.074]         doc.update(limits_doc)
      [2025/08/28 07:14:59.074]     
      [2025/08/28 07:14:59.074]         with self.assertRaisesRegex(WriteError, "object to insert too large"):
      [2025/08/28 07:14:59.074]             await self.coll_encrypted.insert_one(doc)
      [2025/08/28 07:14:59.074]     
      [2025/08/28 07:14:59.074]         # Same with bulk_write.
      [2025/08/28 07:14:59.074]         doc["_id"] = "encryption_exceeds_16mib_bulk"
      [2025/08/28 07:14:59.074]         with self.assertRaises(BulkWriteError) as ctx:
      [2025/08/28 07:14:59.074]             await self.coll_encrypted.bulk_write([InsertOne(doc)])
      [2025/08/28 07:14:59.074]         err = ctx.exception.details["writeErrors"][0]
      [2025/08/28 07:14:59.074] >       self.assertEqual(2, err["code"])
      [2025/08/28 07:14:59.074] E       AssertionError: 2 != 10334
      [2025/08/28 07:14:59.074] test/asynchronous/test_encryption.py:1271: AssertionError
      

            Assignee:
            Noah Stapp
            Reporter:
            Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: