diff options
author | Benety Goh <benety@mongodb.com> | 2018-12-05 17:49:25 -0500 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2018-12-05 17:49:43 -0500 |
commit | b7a866da63617afe5bbb98d13b905fab63449209 (patch) | |
tree | d14c697a99b6600bbced45b90bb2ef165c984ebb | |
parent | 86fab3ee0e1570c6743b314fddc0af418bba9015 (diff) | |
download | mongo-b7a866da63617afe5bbb98d13b905fab63449209.tar.gz |
SERVER-37965 add command result to test assertion messages in mongo_embedded_test index test cases
-rw-r--r-- | src/mongo/embedded/mongo_embedded/mongo_embedded_test.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mongo/embedded/mongo_embedded/mongo_embedded_test.cpp b/src/mongo/embedded/mongo_embedded/mongo_embedded_test.cpp index e3da874a746..8ced4508e2f 100644 --- a/src/mongo/embedded/mongo_embedded/mongo_embedded_test.cpp +++ b/src/mongo/embedded/mongo_embedded/mongo_embedded_test.cpp @@ -240,9 +240,10 @@ TEST_F(MongodbCAPITest, CreateIndex) { auto inputOpMsg = mongo::OpMsgRequest::fromDBAndBody("index_db", inputObj); auto output = performRpc(client, inputOpMsg); - ASSERT(output.hasField("ok")); - ASSERT(output.getField("ok").numberDouble() == 1.0); - ASSERT(output.getIntField("numIndexesAfter") == output.getIntField("numIndexesBefore") + 1); + ASSERT(output.hasField("ok")) << output; + ASSERT(output.getField("ok").numberDouble() == 1.0) << output; + ASSERT(output.getIntField("numIndexesAfter") == output.getIntField("numIndexesBefore") + 1) + << output; } TEST_F(MongodbCAPITest, CreateBackgroundIndex) { @@ -267,8 +268,8 @@ TEST_F(MongodbCAPITest, CreateBackgroundIndex) { auto inputOpMsg = mongo::OpMsgRequest::fromDBAndBody("background_index_db", inputObj); auto output = performRpc(client, inputOpMsg); - ASSERT(output.hasField("ok")); - ASSERT(output.getField("ok").numberDouble() != 1.0); + ASSERT(output.hasField("ok")) << output; + ASSERT(output.getField("ok").numberDouble() != 1.0) << output; } TEST_F(MongodbCAPITest, CreateTTLIndex) { @@ -293,8 +294,8 @@ TEST_F(MongodbCAPITest, CreateTTLIndex) { auto inputOpMsg = mongo::OpMsgRequest::fromDBAndBody("ttl_index_db", inputObj); auto output = performRpc(client, inputOpMsg); - ASSERT(output.hasField("ok")); - ASSERT(output.getField("ok").numberDouble() != 1.0); + ASSERT(output.hasField("ok")) << output; + ASSERT(output.getField("ok").numberDouble() != 1.0) << output; } TEST_F(MongodbCAPITest, TrimMemory) { |