diff options
author | Hari Khalsa <hkhalsa@10gen.com> | 2014-05-12 17:05:11 -0400 |
---|---|---|
committer | Hari Khalsa <hkhalsa@10gen.com> | 2014-05-13 16:07:58 -0400 |
commit | b3e8e45ea6f346f804161e1fe4043ba3e5850ba8 (patch) | |
tree | 4179ad2d0fbb673fc5d72b7a5e84c97c34fe053f /src/mongo/dbtests/counttests.cpp | |
parent | a6a0c243b6cd6a5d45c876ab100a21073c070a00 (diff) | |
download | mongo-b3e8e45ea6f346f804161e1fe4043ba3e5850ba8.tar.gz |
SERVER-13922 remove query yielding and some dbtemprelease
Diffstat (limited to 'src/mongo/dbtests/counttests.cpp')
-rw-r--r-- | src/mongo/dbtests/counttests.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/mongo/dbtests/counttests.cpp b/src/mongo/dbtests/counttests.cpp index c69efefbe11..3fb794eff61 100644 --- a/src/mongo/dbtests/counttests.cpp +++ b/src/mongo/dbtests/counttests.cpp @@ -215,45 +215,6 @@ namespace CountTests { boost::thread _dummyWriter; }; - /** - * The runCount() function yields deterministically with sufficient cursor iteration and a - * mutually exclusive thread awaiting its mutex. SERVER-5428 - */ - class Yield : public Base { - public: - void run() { - // Insert enough documents that counting them will exceed the iteration threshold - // to trigger a yield. - for( int i = 0; i < 1000; ++i ) { - insert( BSON( "a" << 1 ) ); - } - - // Call runCount() under a read lock. - dbtemprelease release; - Client::ReadContext ctx( ns() ); - - int numYieldsBeforeCount = numYields(); - - string err; - int errCode; - ASSERT_EQUALS( 1000, runCount( ns(), countCommand( BSON( "a" << 1 ) ), err, errCode ) ); - ASSERT_EQUALS( "", err ); - - int numYieldsAfterCount = numYields(); - int numYieldsDuringCount = numYieldsAfterCount - numYieldsBeforeCount; - - // The runCount() function yieled. - ASSERT_NOT_EQUALS( 0, numYieldsDuringCount ); - ASSERT( 0 < numYieldsDuringCount ); - } - private: - int numYields() const { - return cc().curop()->info()[ "numYields" ].Int(); - } - // A writer client is registered while the test runs, causing runCount() to yield. - WriterClientScope _writer; - }; - class All : public Suite { public: All() : Suite( "count" ) { @@ -265,7 +226,6 @@ namespace CountTests { add<Fields>(); add<QueryFields>(); add<IndexedRegex>(); - add<Yield>(); } } myall; |