summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/counttests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/dbtests/counttests.cpp')
-rw-r--r--src/mongo/dbtests/counttests.cpp40
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;