diff options
author | Greg Studer <greg@10gen.com> | 2014-04-12 18:40:01 -0400 |
---|---|---|
committer | Greg Studer <greg@10gen.com> | 2014-04-12 18:40:01 -0400 |
commit | 836b1d82810d4b7d98eed8c789f71ed45f473b85 (patch) | |
tree | 81080a32f1847d6d051949927876e0ea49470e38 /src/mongo/s/write_ops/batch_write_op_test.cpp | |
parent | 0b1994a25c85324ea413a95ace2470be3efb7db5 (diff) | |
download | mongo-836b1d82810d4b7d98eed8c789f71ed45f473b85.tar.gz |
SERVER-13518 make sure all tested updates are valid with update exprs
Diffstat (limited to 'src/mongo/s/write_ops/batch_write_op_test.cpp')
-rw-r--r-- | src/mongo/s/write_ops/batch_write_op_test.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/s/write_ops/batch_write_op_test.cpp b/src/mongo/s/write_ops/batch_write_op_test.cpp index 22d505394f0..7170b6f5ce7 100644 --- a/src/mongo/s/write_ops/batch_write_op_test.cpp +++ b/src/mongo/s/write_ops/batch_write_op_test.cpp @@ -92,6 +92,7 @@ namespace { static BatchedUpdateDocument* buildUpdate( const BSONObj& query, bool multi ) { BatchedUpdateDocument* updateDoc = new BatchedUpdateDocument; + updateDoc->setUpdateExpr( BSONObj() ); updateDoc->setQuery( query ); updateDoc->setMulti( multi ); return updateDoc; @@ -1685,7 +1686,9 @@ namespace { BSON( "data" << bigString ), false); request.getUpdateRequest()->addToUpdates(bigUpdateDoc); - request.getUpdateRequest()->addToUpdates(buildUpdate(BSON( "x" << 2 ), false)); + request.getUpdateRequest()->addToUpdates(buildUpdate(BSON( "x" << 2 ), + BSONObj(), + false)); BatchWriteOp batchOp; batchOp.initClientRequest(&request); @@ -1783,6 +1786,7 @@ namespace { for (size_t i = 0; i < BatchedCommandRequest::kMaxWriteBatchSize; ++i) { BatchedUpdateDocument* updateDoc = new BatchedUpdateDocument; updateDoc->setQuery(BSON( "x" << 1 << "data" << dataString )); + updateDoc->setUpdateExpr(BSONObj()); updateDoc->setMulti(false); updateDoc->setUpsert(false); request.getUpdateRequest()->addToUpdates(updateDoc); |