summaryrefslogtreecommitdiff
path: root/src/mongo/db/namespace_string_test.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2015-06-22 12:25:10 -0400
committerDavid Storch <david.storch@10gen.com>2015-06-23 14:16:18 -0400
commitb8f0f273d8f2db1aed1974b94c9b18a63656ad48 (patch)
treeef86771a005eed7dc7d409857f187aba764a0a02 /src/mongo/db/namespace_string_test.cpp
parentedfeb6a9f7a5f30a951c673374e9e058b1886a10 (diff)
downloadmongo-b8f0f273d8f2db1aed1974b94c9b18a63656ad48.tar.gz
SERVER-5811 implement the killCursors command for mongod
Implementing the killCursors command in mongos and the mongo shell is further work.
Diffstat (limited to 'src/mongo/db/namespace_string_test.cpp')
-rw-r--r--src/mongo/db/namespace_string_test.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/mongo/db/namespace_string_test.cpp b/src/mongo/db/namespace_string_test.cpp
index d1b3c7b4420..ba85cc775e3 100644
--- a/src/mongo/db/namespace_string_test.cpp
+++ b/src/mongo/db/namespace_string_test.cpp
@@ -88,39 +88,39 @@ TEST(NamespaceStringTest, DatabaseValidNames) {
ASSERT(NamespaceString::normal("local.oplog.$main"));
}
-TEST(NamespaceStringTest, ListCollectionsGetMore) {
- ASSERT(NamespaceString("test.$cmd.listCollections").isListCollectionsGetMore());
+TEST(NamespaceStringTest, ListCollectionsCursorNS) {
+ ASSERT(NamespaceString("test.$cmd.listCollections").isListCollectionsCursorNS());
- ASSERT(!NamespaceString("test.foo").isListCollectionsGetMore());
- ASSERT(!NamespaceString("test.foo.$cmd.listCollections").isListCollectionsGetMore());
- ASSERT(!NamespaceString("test.$cmd.").isListCollectionsGetMore());
- ASSERT(!NamespaceString("test.$cmd.foo.").isListCollectionsGetMore());
- ASSERT(!NamespaceString("test.$cmd.listCollections.").isListCollectionsGetMore());
- ASSERT(!NamespaceString("test.$cmd.listIndexes").isListCollectionsGetMore());
- ASSERT(!NamespaceString("test.$cmd.listIndexes.foo").isListCollectionsGetMore());
+ ASSERT(!NamespaceString("test.foo").isListCollectionsCursorNS());
+ ASSERT(!NamespaceString("test.foo.$cmd.listCollections").isListCollectionsCursorNS());
+ ASSERT(!NamespaceString("test.$cmd.").isListCollectionsCursorNS());
+ ASSERT(!NamespaceString("test.$cmd.foo.").isListCollectionsCursorNS());
+ ASSERT(!NamespaceString("test.$cmd.listCollections.").isListCollectionsCursorNS());
+ ASSERT(!NamespaceString("test.$cmd.listIndexes").isListCollectionsCursorNS());
+ ASSERT(!NamespaceString("test.$cmd.listIndexes.foo").isListCollectionsCursorNS());
}
-TEST(NamespaceStringTest, ListIndexesGetMore) {
+TEST(NamespaceStringTest, ListIndexesCursorNS) {
NamespaceString ns1("test.$cmd.listIndexes.f");
- ASSERT(ns1.isListIndexesGetMore());
- ASSERT("test.f" == ns1.getTargetNSForListIndexesGetMore().ns());
+ ASSERT(ns1.isListIndexesCursorNS());
+ ASSERT("test.f" == ns1.getTargetNSForListIndexes().ns());
NamespaceString ns2("test.$cmd.listIndexes.foo");
- ASSERT(ns2.isListIndexesGetMore());
- ASSERT("test.foo" == ns2.getTargetNSForListIndexesGetMore().ns());
+ ASSERT(ns2.isListIndexesCursorNS());
+ ASSERT("test.foo" == ns2.getTargetNSForListIndexes().ns());
NamespaceString ns3("test.$cmd.listIndexes.foo.bar");
- ASSERT(ns3.isListIndexesGetMore());
- ASSERT("test.foo.bar" == ns3.getTargetNSForListIndexesGetMore().ns());
-
- ASSERT(!NamespaceString("test.foo").isListIndexesGetMore());
- ASSERT(!NamespaceString("test.foo.$cmd.listIndexes").isListIndexesGetMore());
- ASSERT(!NamespaceString("test.$cmd.").isListIndexesGetMore());
- ASSERT(!NamespaceString("test.$cmd.foo.").isListIndexesGetMore());
- ASSERT(!NamespaceString("test.$cmd.listIndexes").isListIndexesGetMore());
- ASSERT(!NamespaceString("test.$cmd.listIndexes.").isListIndexesGetMore());
- ASSERT(!NamespaceString("test.$cmd.listCollections").isListIndexesGetMore());
- ASSERT(!NamespaceString("test.$cmd.listCollections.foo").isListIndexesGetMore());
+ ASSERT(ns3.isListIndexesCursorNS());
+ ASSERT("test.foo.bar" == ns3.getTargetNSForListIndexes().ns());
+
+ ASSERT(!NamespaceString("test.foo").isListIndexesCursorNS());
+ ASSERT(!NamespaceString("test.foo.$cmd.listIndexes").isListIndexesCursorNS());
+ ASSERT(!NamespaceString("test.$cmd.").isListIndexesCursorNS());
+ ASSERT(!NamespaceString("test.$cmd.foo.").isListIndexesCursorNS());
+ ASSERT(!NamespaceString("test.$cmd.listIndexes").isListIndexesCursorNS());
+ ASSERT(!NamespaceString("test.$cmd.listIndexes.").isListIndexesCursorNS());
+ ASSERT(!NamespaceString("test.$cmd.listCollections").isListIndexesCursorNS());
+ ASSERT(!NamespaceString("test.$cmd.listCollections.foo").isListIndexesCursorNS());
}
TEST(NamespaceStringTest, CollectionComponentValidNames) {