summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDivjot Arora <divjot.arora@10gen.com>2019-03-08 14:24:49 -0500
committerDivjot Arora <divjot.arora@10gen.com>2019-03-13 16:34:27 -0400
commit537ba4469fb872027a59b26344de28e715684679 (patch)
tree7cc09abba297a4ee1badc44d45ea99bfd278e477
parente3407fe85774f6b8b0a76eef1a3040321537b760 (diff)
downloadmongo-537ba4469fb872027a59b26344de28e715684679.tar.gz
SERVER-40045 Fix ValidateError test to use StringData instead of std::string
-rw-r--r--src/mongo/db/catalog/collection_test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/catalog/collection_test.cpp b/src/mongo/db/catalog/collection_test.cpp
index 3b85aa479c9..c847faea2db 100644
--- a/src/mongo/db/catalog/collection_test.cpp
+++ b/src/mongo/db/catalog/collection_test.cpp
@@ -277,9 +277,9 @@ TEST_F(CollectionTest, ValidateError) {
Collection* coll = agc.getCollection();
RecordStore* rs = coll->getRecordStore();
- std::string invalidBson = "\0\0\0\0\0";
- const char* recordData = invalidBson.c_str();
- auto statusWithId = rs->insertRecord(opCtx, recordData, 5, Timestamp::min());
+ auto invalidBson = "\0\0\0\0\0"_sd;
+ auto statusWithId =
+ rs->insertRecord(opCtx, invalidBson.rawData(), invalidBson.size(), Timestamp::min());
ASSERT_OK(statusWithId.getStatus());
checkValidate(coll, false, 1, 1, 1);
}