You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// #. Create a MongoClient without encryption enabled (referred to as ``client``).
486
+
this.client=this.configuration.newClient(
487
+
{},
488
+
{useNewUrlParser: true,useUnifiedTopology: true}
489
+
);
490
+
491
+
this.events=newSet();
492
+
493
+
return(
494
+
this.client
495
+
.connect()
496
+
// #. Using ``client``, drop and create the collection ``db.coll`` configured with the included JSON schema `limits/limits-schema.json <../limits/limits-schema.json>`_.
// #. Insert the document `limits/limits-doc.json <../limits/limits-doc.json>`_ concatenated with ``{ "_id": "encryption_exceeds_2mib", "unencrypted": < the string "a" repeated (2097152 - 2000) times > }``
581
+
// Note: limits-doc.json is a 1005 byte BSON document that encrypts to a ~10,000 byte document.
582
+
// Expect this to succeed since after encryption this still is below the normal maximum BSON document size.
583
+
// Note, before auto encryption this document is under the 2 MiB limit. After encryption it exceeds the 2 MiB limit, but does NOT exceed the 16 MiB limit.
584
+
{
585
+
description: 'should succeed for encryption_exceeds_2mib',
// Expect the bulk write to succeed and split after first doc (i.e. two inserts occur). This may be verified using `command monitoring <https://github.com./mongodb/specifications/tree/master/source/command-monitoring/command-monitoring.rst>`_.
// - The document `limits/limits-doc.json <../limits/limits-doc.json>`_ concatenated with ``{ "_id": "encryption_exceeds_2mib_1", "unencrypted": < the string "a" repeated (2097152 - 2000) times > }``
608
+
// - The document `limits/limits-doc.json <../limits/limits-doc.json>`_ concatenated with ``{ "_id": "encryption_exceeds_2mib_2", "unencrypted": < the string "a" repeated (2097152 - 2000) times > }``
609
+
// Expect the bulk write to succeed and split after first doc (i.e. two inserts occur). This may be verified using `command monitoring <https://github.com./mongodb/specifications/tree/master/source/command-monitoring/command-monitoring.rst>`_.
610
+
{
611
+
description: 'should succeed for bulk encryption_exceeds_2mib',
// #. Insert the document `limits/limits-doc.json <../limits/limits-doc.json>`_ concatenated with ``{ "_id": "encryption_exceeds_16mib", "unencrypted": < the string "a" repeated (16777216 - 2000) times > }``
632
+
// Expect this to fail since encryption results in a document exceeding the ``maxBsonObjectSize`` limit.
633
+
{
634
+
description: 'should fail for encryption_exceeds_16mib',
0 commit comments