summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/cursor_manager_test.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2019-01-30 13:22:25 -0500
committerDavid Storch <david.storch@10gen.com>2019-01-31 08:31:49 -0500
commit4b55effde2d01fa84141f02203a0433a6a4d58f2 (patch)
tree8ec6edb4d2e2fbf814f80f21bf419837f26132fe /src/mongo/dbtests/cursor_manager_test.cpp
parent1d644fa898de455bb160200e198c6895d5590409 (diff)
downloadmongo-4b55effde2d01fa84141f02203a0433a6a4d58f2.tar.gz
SERVER-37452 Remove concept of globally managed cursor IDs.
Diffstat (limited to 'src/mongo/dbtests/cursor_manager_test.cpp')
-rw-r--r--src/mongo/dbtests/cursor_manager_test.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/mongo/dbtests/cursor_manager_test.cpp b/src/mongo/dbtests/cursor_manager_test.cpp
index 8e0e5edac41..866881009e0 100644
--- a/src/mongo/dbtests/cursor_manager_test.cpp
+++ b/src/mongo/dbtests/cursor_manager_test.cpp
@@ -56,31 +56,6 @@ namespace mongo {
namespace {
const NamespaceString kTestNss{"test.collection"};
-TEST(CursorManagerTest, IsGloballyManagedCursorShouldReturnFalseIfLeadingBitsAreZeroes) {
- ASSERT_FALSE(CursorManager::isGloballyManagedCursor(0x0000000000000000));
- ASSERT_FALSE(CursorManager::isGloballyManagedCursor(0x000000000FFFFFFF));
- ASSERT_FALSE(CursorManager::isGloballyManagedCursor(0x000000007FFFFFFF));
- ASSERT_FALSE(CursorManager::isGloballyManagedCursor(0x0FFFFFFFFFFFFFFF));
- ASSERT_FALSE(CursorManager::isGloballyManagedCursor(0x3FFFFFFFFFFFFFFF));
- ASSERT_FALSE(CursorManager::isGloballyManagedCursor(0x3dedbeefdeadbeef));
-}
-
-TEST(CursorManagerTest, IsGloballyManagedCursorShouldReturnTrueIfLeadingBitsAreZeroAndOne) {
- ASSERT_TRUE(CursorManager::isGloballyManagedCursor(0x4FFFFFFFFFFFFFFF));
- ASSERT_TRUE(CursorManager::isGloballyManagedCursor(0x5FFFFFFFFFFFFFFF));
- ASSERT_TRUE(CursorManager::isGloballyManagedCursor(0x6FFFFFFFFFFFFFFF));
- ASSERT_TRUE(CursorManager::isGloballyManagedCursor(0x7FFFFFFFFFFFFFFF));
- ASSERT_TRUE(CursorManager::isGloballyManagedCursor(0x4000000000000000));
- ASSERT_TRUE(CursorManager::isGloballyManagedCursor(0x4dedbeefdeadbeef));
-}
-
-TEST(CursorManagerTest, IsGloballyManagedCursorShouldReturnFalseIfLeadingBitIsAOne) {
- ASSERT_FALSE(CursorManager::isGloballyManagedCursor(~0LL));
- ASSERT_FALSE(CursorManager::isGloballyManagedCursor(0xFFFFFFFFFFFFFFFF));
- ASSERT_FALSE(CursorManager::isGloballyManagedCursor(0x8FFFFFFFFFFFFFFF));
- ASSERT_FALSE(CursorManager::isGloballyManagedCursor(0x8dedbeefdeadbeef));
-}
-
class CursorManagerTest : public unittest::Test {
public:
CursorManagerTest()
@@ -146,20 +121,6 @@ class CursorManagerTestCustomOpCtx : public CursorManagerTest {
}
};
-TEST_F(CursorManagerTest, GlobalCursorManagerShouldReportOwnershipOfCursorsItCreated) {
- for (int i = 0; i < 1000; i++) {
- auto cursorPin = CursorManager::getGlobalCursorManager()->registerCursor(
- _opCtx.get(),
- {makeFakePlanExecutor(),
- NamespaceString{"test.collection"},
- {},
- repl::ReadConcernArgs(repl::ReadConcernLevel::kLocalReadConcern),
- BSONObj(),
- ClientCursorParams::LockPolicy::kLocksInternally});
- ASSERT_TRUE(CursorManager::isGloballyManagedCursor(cursorPin.getCursor()->cursorid()));
- }
-}
-
/**
* Test that an attempt to kill a pinned cursor succeeds.
*/