summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/clienttests.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2014-03-04 16:28:28 -0500
committerEliot Horowitz <eliot@10gen.com>2014-04-03 13:31:48 -0400
commit1e2175e1b4c230c2b7fce724cbafc61c5272b522 (patch)
tree9ed359571aebc94f4786798bc8520b4439d57226 /src/mongo/dbtests/clienttests.cpp
parentee2e11d9a364677a5d495bf1252e87dcc5f0fb6c (diff)
downloadmongo-1e2175e1b4c230c2b7fce724cbafc61c5272b522.tar.gz
SERVER-11643: remove all active nsdetails calls in tests
Diffstat (limited to 'src/mongo/dbtests/clienttests.cpp')
-rw-r--r--src/mongo/dbtests/clienttests.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mongo/dbtests/clienttests.cpp b/src/mongo/dbtests/clienttests.cpp
index 096b0f142c8..e47e67ea4ea 100644
--- a/src/mongo/dbtests/clienttests.cpp
+++ b/src/mongo/dbtests/clienttests.cpp
@@ -31,8 +31,9 @@
#include "mongo/pch.h"
#include "mongo/client/dbclientcursor.h"
+#include "mongo/db/catalog/collection.h"
+#include "mongo/db/catalog/database.h"
#include "mongo/db/d_concurrency.h"
-#include "mongo/db/pdfile.h"
#include "mongo/dbtests/dbtests.h"
namespace ClientTests {
@@ -128,7 +129,11 @@ namespace ClientTests {
db.insert(ns(), BSON("x" << 1 << "y" << 2));
db.insert(ns(), BSON("x" << 2 << "y" << 2));
- ASSERT_EQUALS(1, nsdetails(ns())->getCompletedIndexCount());
+ Collection* collection = ctx.ctx().db()->getCollection( ns() );
+ ASSERT( collection );
+ IndexCatalog* indexCatalog = collection->getIndexCatalog();
+
+ ASSERT_EQUALS(1, indexCatalog->numIndexesReady());
// _id index
ASSERT_EQUALS(1U, db.count("test.system.indexes"));
// test.buildindex
@@ -138,13 +143,13 @@ namespace ClientTests {
db.ensureIndex(ns(), BSON("y" << 1), true);
- ASSERT_EQUALS(1, nsdetails(ns())->getCompletedIndexCount());
+ ASSERT_EQUALS(1, indexCatalog->numIndexesReady());
ASSERT_EQUALS(1U, db.count("test.system.indexes"));
ASSERT_EQUALS(3U, db.count("test.system.namespaces"));
db.ensureIndex(ns(), BSON("x" << 1), true);
- ASSERT_EQUALS(2, nsdetails(ns())->getCompletedIndexCount());
+ ASSERT_EQUALS(2, indexCatalog->numIndexesReady());
ASSERT_EQUALS(2U, db.count("test.system.indexes"));
ASSERT_EQUALS(4U, db.count("test.system.namespaces"));
}