Skip to content

Commit 8dddd1f

Browse files
committed
Remove test
1 parent 28b4048 commit 8dddd1f

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

src/libmongoc/tests/test-mongoc-bulk.c

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -5080,49 +5080,6 @@ test_bulk_write_set_client_after_operation (void)
50805080
mongoc_client_destroy (client);
50815081
}
50825082

5083-
// Test creating a bulk write with more data than INT_MAX.
5084-
static void
5085-
test_bulk_write_more_than_INT_MAX (void)
5086-
{
5087-
bool ok;
5088-
bson_error_t error;
5089-
5090-
// Create large document.
5091-
bson_t large_doc = BSON_INITIALIZER;
5092-
{
5093-
// Maximum server document size is 16 MiB (16777216).
5094-
// Subtract 32 for overhead.
5095-
size_t large_sz = 16777216 - 32;
5096-
char *large_str = bson_malloc (large_sz);
5097-
memset (large_str, 'A', large_sz - 1);
5098-
large_str[large_sz - 1] = '\0';
5099-
BSON_ASSERT (
5100-
bson_append_utf8 (&large_doc, "key", 3, large_str, large_sz));
5101-
bson_free (large_str);
5102-
}
5103-
5104-
mongoc_client_t *client = test_framework_new_default_client ();
5105-
mongoc_collection_t *coll =
5106-
mongoc_client_get_collection (client, "db", "coll");
5107-
mongoc_bulk_operation_t *bulk =
5108-
mongoc_collection_create_bulk_operation_with_opts (coll, NULL /* opts */);
5109-
size_t added = 0;
5110-
while (added < (size_t) INT_MAX) {
5111-
ok = mongoc_bulk_operation_insert_with_opts (
5112-
bulk, &large_doc, NULL /* opts */, &error);
5113-
ASSERT_OR_PRINT (ok, error);
5114-
added += large_doc.len;
5115-
}
5116-
5117-
ok = (bool) mongoc_bulk_operation_execute (bulk, NULL /* reply */, &error);
5118-
ASSERT_OR_PRINT (ok, error);
5119-
5120-
bson_destroy (&large_doc);
5121-
mongoc_bulk_operation_destroy (bulk);
5122-
mongoc_collection_destroy (coll);
5123-
mongoc_client_destroy (client);
5124-
}
5125-
51265083
void
51275084
test_bulk_install (TestSuite *suite)
51285085
{
@@ -5435,7 +5392,4 @@ test_bulk_install (TestSuite *suite)
54355392
TestSuite_AddLive (suite,
54365393
"/BulkOperation/set_client_after_operation",
54375394
test_bulk_write_set_client_after_operation);
5438-
TestSuite_AddLive (suite,
5439-
"/BulkOperation/more_than_INT_MAX",
5440-
test_bulk_write_more_than_INT_MAX);
54415395
}

0 commit comments

Comments
 (0)