summaryrefslogtreecommitdiff
path: root/src/mongo/bson/ugly_bson_integration_test.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-05-30 16:50:03 -0400
committerMathias Stearn <mathias@10gen.com>2017-06-13 17:15:27 -0400
commit52c36ee17b8f58d71b074fe2cf34ca0b3a744f5c (patch)
treea5e2e340db71fc2ea8d6a3b64cd3a57d61684a2d /src/mongo/bson/ugly_bson_integration_test.cpp
parentbf2ddb54895019b59495fb5ea96413b64b45aa7f (diff)
downloadmongo-52c36ee17b8f58d71b074fe2cf34ca0b3a744f5c.tar.gz
SERVER-29461 check for duplicate fields when serializing OP_MSG
Diffstat (limited to 'src/mongo/bson/ugly_bson_integration_test.cpp')
-rw-r--r--src/mongo/bson/ugly_bson_integration_test.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/bson/ugly_bson_integration_test.cpp b/src/mongo/bson/ugly_bson_integration_test.cpp
index aec92665824..baa53cc5051 100644
--- a/src/mongo/bson/ugly_bson_integration_test.cpp
+++ b/src/mongo/bson/ugly_bson_integration_test.cpp
@@ -36,6 +36,8 @@
#include "mongo/unittest/integration_test.h"
#include "mongo/unittest/unittest.h"
#include "mongo/util/assert_util.h"
+#include "mongo/util/net/op_msg.h"
+#include "mongo/util/scopeguard.h"
namespace mongo {
namespace executor {
@@ -48,6 +50,9 @@ class UglyBSONFixture : public NetworkInterfaceASIOIntegrationFixture {
};
TEST_F(UglyBSONFixture, DuplicateFields) {
+ OpMsgBuilder::disableDupeFieldCheck_forTest.store(true);
+ ON_BLOCK_EXIT([] { OpMsgBuilder::disableDupeFieldCheck_forTest.store(false); });
+
assertCommandFailsOnServer("admin",
BSON("insert"
<< "test"