diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/catalog_raii_test.cpp | 15 | ||||
-rw-r--r-- | src/mongo/db/db_raii_test.cpp | 3 |
2 files changed, 7 insertions, 11 deletions
diff --git a/src/mongo/db/catalog_raii_test.cpp b/src/mongo/db/catalog_raii_test.cpp index 97c67cd0f25..b717c19b2b4 100644 --- a/src/mongo/db/catalog_raii_test.cpp +++ b/src/mongo/db/catalog_raii_test.cpp @@ -94,8 +94,7 @@ TEST_F(CatalogRAIITestFixture, AutoGetDBDeadline) { } TEST_F(CatalogRAIITestFixture, AutoGetDBGlobalLockDeadline) { - Lock::GlobalLock gLock1( - client1.second.get(), MODE_X, Date_t::now(), Lock::InterruptBehavior::kThrow); + Lock::GlobalLock gLock1(client1.second.get(), MODE_X); ASSERT(gLock1.isLocked()); failsWithLockTimeout( [&] { AutoGetDb db(client2.second.get(), nss.db(), MODE_X, Date_t::now() + timeoutMs); }, @@ -105,7 +104,7 @@ TEST_F(CatalogRAIITestFixture, AutoGetDBGlobalLockDeadline) { TEST_F(CatalogRAIITestFixture, AutoGetDBDeadlineNow) { Lock::DBLock dbLock1(client1.second.get(), nss.db(), MODE_IX); ASSERT(client1.second->lockState()->isDbLockedForMode(nss.db(), MODE_IX)); - AutoGetDb db(client2.second.get(), nss.db(), MODE_IX, Date_t::now()); + AutoGetDb db(client2.second.get(), nss.db(), MODE_IX); failsWithLockTimeout( [&] { AutoGetDb db(client2.second.get(), nss.db(), MODE_X, Date_t::now()); }, Milliseconds(0)); @@ -114,10 +113,9 @@ TEST_F(CatalogRAIITestFixture, AutoGetDBDeadlineNow) { TEST_F(CatalogRAIITestFixture, AutoGetDBDeadlineMin) { Lock::DBLock dbLock1(client1.second.get(), nss.db(), MODE_IX); ASSERT(client1.second->lockState()->isDbLockedForMode(nss.db(), MODE_IX)); - AutoGetDb db(client2.second.get(), nss.db(), MODE_IX, Date_t::now()); - failsWithLockTimeout( - [&] { AutoGetDb db(client2.second.get(), nss.db(), MODE_X, Date_t::now()); }, - Milliseconds(0)); + AutoGetDb db(client2.second.get(), nss.db(), MODE_IX); + failsWithLockTimeout([&] { AutoGetDb db(client2.second.get(), nss.db(), MODE_X, Date_t{}); }, + Milliseconds(0)); } TEST_F(CatalogRAIITestFixture, AutoGetOrCreateDbDeadline) { @@ -161,8 +159,7 @@ TEST_F(CatalogRAIITestFixture, AutoGetCollectionDBLockDeadline) { } TEST_F(CatalogRAIITestFixture, AutoGetCollectionGlobalLockDeadline) { - Lock::GlobalLock gLock1( - client1.second.get(), MODE_X, Date_t::now(), Lock::InterruptBehavior::kThrow); + Lock::GlobalLock gLock1(client1.second.get(), MODE_X); ASSERT(client1.second->lockState()->isLocked()); failsWithLockTimeout( [&] { diff --git a/src/mongo/db/db_raii_test.cpp b/src/mongo/db/db_raii_test.cpp index 0ef79af2757..73a072aa86a 100644 --- a/src/mongo/db/db_raii_test.cpp +++ b/src/mongo/db/db_raii_test.cpp @@ -104,8 +104,7 @@ TEST_F(DBRAIITestFixture, AutoGetCollectionForReadDBLockDeadline) { } TEST_F(DBRAIITestFixture, AutoGetCollectionForReadGlobalLockDeadline) { - Lock::GlobalLock gLock1( - client1.second.get(), MODE_X, Date_t::now(), Lock::InterruptBehavior::kThrow); + Lock::GlobalLock gLock1(client1.second.get(), MODE_X); ASSERT(client1.second->lockState()->isLocked()); failsWithLockTimeout( [&] { |