diff options
author | Mathias Stearn <mathias@10gen.com> | 2014-10-02 13:55:38 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2014-10-02 16:16:57 -0400 |
commit | 0a4f71b28243627ed868139e9bf4286fcc661fd4 (patch) | |
tree | 713e6c1f19bb9d42d9a266d233d2e43358fb8e98 /src/mongo/dbtests/indexupdatetests.cpp | |
parent | 111621fed826b9ef5e18f511198104a6a872f964 (diff) | |
download | mongo-0a4f71b28243627ed868139e9bf4286fcc661fd4.tar.gz |
SERVER-13635 stop relying on system.indexes in dbtests
Diffstat (limited to 'src/mongo/dbtests/indexupdatetests.cpp')
-rw-r--r-- | src/mongo/dbtests/indexupdatetests.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/dbtests/indexupdatetests.cpp b/src/mongo/dbtests/indexupdatetests.cpp index 3640d52ddb2..1e9e3a520b1 100644 --- a/src/mongo/dbtests/indexupdatetests.cpp +++ b/src/mongo/dbtests/indexupdatetests.cpp @@ -570,6 +570,8 @@ namespace IndexUpdateTests { for( int32_t i = 0; i < nDocs; ++i ) { _client.insert( _ns, BSON( "a" << i ) ); } + // Start with just _id + ASSERT_EQUALS( 1U, _client.getIndexSpecs(_ns).size()); // Initialize curop. _txn.getCurOp()->reset(); // Request an interrupt. killAll() rather than kill() is required because the direct @@ -579,10 +581,8 @@ namespace IndexUpdateTests { _client.ensureIndex( _ns, BSON( "a" << 1 ) ); // only want to interrupt the index build getGlobalEnvironment()->unsetKillAllOperations(); - // The new index is listed in system.indexes because the index build completed. - ASSERT_EQUALS( 1U, - _client.count( "unittests.system.indexes", - BSON( "ns" << _ns << "name" << "a_1" ) ) ); + // The new index is listed in getIndexSpecs because the index build completed. + ASSERT_EQUALS( 2U, _client.getIndexSpecs(_ns).size()); } }; @@ -596,6 +596,8 @@ namespace IndexUpdateTests { for( int32_t i = 0; i < nDocs; ++i ) { _client.insert( _ns, BSON( "a" << i ) ); } + // Start with just _id + ASSERT_EQUALS( 1U, _client.getIndexSpecs(_ns).size()); // Initialize curop. _txn.getCurOp()->reset(); // Request an interrupt. @@ -605,10 +607,8 @@ namespace IndexUpdateTests { // only want to interrupt the index build wunit.commit(); getGlobalEnvironment()->unsetKillAllOperations(); - // The new index is listed in system.indexes because the index build completed. - ASSERT_EQUALS( 1U, - _client.count( "unittests.system.indexes", - BSON( "ns" << _ns << "name" << "a_1" ) ) ); + // The new index is listed in getIndexSpecs because the index build completed. + ASSERT_EQUALS( 2U, _client.getIndexSpecs(_ns).size()); } }; // QUERY_MIGRATION |