diff options
author | Ben Caimano <ben.caimano@mongodb.com> | 2019-10-17 00:51:52 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-17 00:51:52 +0000 |
commit | 27ed83ca30107c8e39417ba1dfed5ec0dd8b859d (patch) | |
tree | 399e5b548782b6c84627389f94ddb61909e2746a /src/mongo/db/session_catalog_test.cpp | |
parent | b37eb88c8ae801751711dd54f2506d3561989db7 (diff) | |
download | mongo-27ed83ca30107c8e39417ba1dfed5ec0dd8b859d.tar.gz |
SERVER-43987 Require predicates with OperationContext::waitForConditionOrInterrupt()
Diffstat (limited to 'src/mongo/db/session_catalog_test.cpp')
-rw-r--r-- | src/mongo/db/session_catalog_test.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/session_catalog_test.cpp b/src/mongo/db/session_catalog_test.cpp index 58e03aa20b4..cd086a9e8b0 100644 --- a/src/mongo/db/session_catalog_test.cpp +++ b/src/mongo/db/session_catalog_test.cpp @@ -603,8 +603,10 @@ TEST_F(SessionCatalogTestWithDefaultOpCtx, ConcurrentCheckOutAndKill) { auto m = MONGO_MAKE_LATCH(); stdx::condition_variable cond; stdx::unique_lock<Latch> lock(m); - ASSERT_EQ(ErrorCodes::InternalError, - _opCtx->waitForConditionOrInterruptNoAssert(cond, lock)); + ASSERT_THROWS_CODE( + _opCtx->waitForConditionOrInterrupt(cond, lock, [] { return false; }), + DBException, + ErrorCodes::InternalError); } } normalCheckOutFinish.get(); |