File tree 2 files changed +2
-4
lines changed
2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -584,10 +584,8 @@ def test_upsert(self):
584
584
self .assertEqual (self .coll .find ({'x' : 2 }).count (), 0 )
585
585
586
586
def test_upsert_large (self ):
587
- # We can insert a 16MB document, using an update command a little over
588
- # 16MB long.
589
587
client = self .coll .database .connection
590
- big = 'a' * (client .max_bson_size - 30 )
588
+ big = 'a' * (client .max_bson_size - 37 )
591
589
bulk = self .coll .initialize_ordered_bulk_op ()
592
590
bulk .find ({'x' : 1 }).upsert ().update ({'$set' : {'s' : big }})
593
591
result = bulk .execute ()
Original file line number Diff line number Diff line change @@ -1859,7 +1859,7 @@ def test_insert_large_document(self):
1859
1859
self .assertRaises (DocumentTooLarge , self .db .test .update ,
1860
1860
{"bar" : "x" }, {"bar" : "x" * (max_size - 14 )}, w = 0 )
1861
1861
# This will pass with OP_UPDATE or the update command.
1862
- self .db .test .update ({"bar" : "x" }, {"bar" : "x" * (max_size - 15 )})
1862
+ self .db .test .update ({"bar" : "x" }, {"bar" : "x" * (max_size - 32 )})
1863
1863
1864
1864
def test_insert_large_batch (self ):
1865
1865
max_bson_size = self .client .max_bson_size
You can’t perform that action at this time.
0 commit comments