Skip to content

Commit 656b214

Browse files
committed
chore(encryption): incorporating review feedback
1 parent 4648b7a commit 656b214

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

lib/bulk/common.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -754,10 +754,10 @@ class BulkOperationBase {
754754

755755
// If we have autoEncryption on, batch-splitting must be done on 2mb chunks, but single documents
756756
// over 2mb are still allowed
757-
const autoEncrypter = topology.s.options && topology.s.options.autoEncrypter;
757+
const usingAutoEncryption = !!(topology.s.options && topology.s.options.autoEncrypter);
758758
const maxBsonObjectSize =
759759
isMaster && isMaster.maxBsonObjectSize ? isMaster.maxBsonObjectSize : 1024 * 1024 * 16;
760-
const maxBatchSizeBytes = autoEncrypter ? 1024 * 1024 * 2 : maxBsonObjectSize;
760+
const maxBatchSizeBytes = usingAutoEncryption ? 1024 * 1024 * 2 : maxBsonObjectSize;
761761
const maxWriteBatchSize =
762762
isMaster && isMaster.maxWriteBatchSize ? isMaster.maxWriteBatchSize : 1000;
763763

test/functional/client_side_encryption_tests.js

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ describe('Client Side Encryption', function() {
2323
});
2424

2525
generateTopologyTests(testSuites, testContext, spec => {
26+
// Note: we are skipping regex tests b/c we currently deserialize straight to native
27+
// regex representation instead of to BSONRegExp.
2628
return !spec.description.match(/type=regex/);
2729
});
2830
});

test/runner/filters/client_encryption_filter.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ class ClientSideEncryptionFilter {
2525

2626
this.enabled = !!(AWS_ACCESS_KEY_ID && AWS_SECRET_ACCESS_KEY && mongodbClientEncryption);
2727

28-
// TODO: shove these fields on to the context so they can be reused.
29-
28+
// Adds these fields onto the context so that they can be reused by tests
3029
context.clientSideEncryption = {
3130
enabled: this.enabled,
3231
mongodbClientEncryption,

0 commit comments

Comments
 (0)