diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2018-03-07 12:29:22 -0500 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2018-03-12 14:59:17 -0400 |
commit | 3f723beb10caf6bd809b7df05c34b6a97402dadb (patch) | |
tree | 170e3d1c38808281fb216f4e934abcd336b1743c /src/mongo/dbtests | |
parent | b1102c617e04ff751d702435f9d4521727e579e1 (diff) | |
download | mongo-3f723beb10caf6bd809b7df05c34b6a97402dadb.tar.gz |
SERVER-33542 Avoid swallowing error codes from PlanExecutor errors
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r-- | src/mongo/dbtests/documentsourcetests.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/dbtests/documentsourcetests.cpp b/src/mongo/dbtests/documentsourcetests.cpp index 98ab5fc9e68..ebfaccbde5c 100644 --- a/src/mongo/dbtests/documentsourcetests.cpp +++ b/src/mongo/dbtests/documentsourcetests.cpp @@ -388,7 +388,8 @@ TEST_F(DocumentSourceCursorTest, TailableAwaitDataCursorShouldErrorAfterTimeout) DocumentSourceCursor::create(readLock.getCollection(), std::move(planExecutor), ctx()); ON_BLOCK_EXIT([cursor]() { cursor->dispose(); }); - ASSERT_THROWS_CODE(cursor->getNext().isEOF(), AssertionException, ErrorCodes::QueryPlanKilled); + ASSERT_THROWS_CODE( + cursor->getNext().isEOF(), AssertionException, ErrorCodes::ExceededTimeLimit); } TEST_F(DocumentSourceCursorTest, NonAwaitDataCursorShouldErrorAfterTimeout) { @@ -425,7 +426,8 @@ TEST_F(DocumentSourceCursorTest, NonAwaitDataCursorShouldErrorAfterTimeout) { DocumentSourceCursor::create(readLock.getCollection(), std::move(planExecutor), ctx()); ON_BLOCK_EXIT([cursor]() { cursor->dispose(); }); - ASSERT_THROWS_CODE(cursor->getNext().isEOF(), AssertionException, ErrorCodes::QueryPlanKilled); + ASSERT_THROWS_CODE( + cursor->getNext().isEOF(), AssertionException, ErrorCodes::ExceededTimeLimit); } TEST_F(DocumentSourceCursorTest, TailableAwaitDataCursorShouldErrorAfterBeingKilled) { |