Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/libmongoc/tests/test-mongoc-client-side-encryption.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,17 @@ test_bson_size_limits_and_batch_splitting(void *unused)
bson_append_utf8(docs[0], "_id", -1, "under_16mib", -1);
bson_append_utf8(docs[0], "unencrypted", -1, as, exceeds_16mib_after_encryption);
BSON_ASSERT(!mongoc_collection_insert_one(coll, docs[0], NULL /* opts */, NULL /* reply */, &error));
ASSERT_ERROR_CONTAINS(error, MONGOC_ERROR_SERVER, 2, "too large");
{
const uint32_t too_large = 10334;
// SERVER-104405 changed the expected error code from 2 to 10334:
const uint32_t too_large_old = 2;
ASSERT_CMPUINT32(error.domain, ==, (uint32_t)MONGOC_ERROR_SERVER);
if (error.code != too_large && error.code != too_large_old) {
test_error(
"Unexpected error: %" PRIu32 ". Expected %" PRIu32 " or %" PRIu32, error.code, too_large, too_large_old);
}
ASSERT_CONTAINS(error.message, "too large");
}
bson_destroy(docs[0]);

bson_free(as);
Expand Down