summaryrefslogtreecommitdiff
path: root/jstests/mr_drop.js
diff options
context:
space:
mode:
authorScott Hernandez <scotthernandez@gmail.com>2014-03-25 15:29:54 -0400
committerScott Hernandez <scotthernandez@gmail.com>2014-03-25 18:34:49 -0400
commit57f97f213346b7a0305c81fd70894a77ca35a886 (patch)
tree2298ebe1b7cb4a6faaa7e2e06ccd9a098b661acf /jstests/mr_drop.js
parente73399e0e696aaaf1e859533e10cc2b74d46994f (diff)
downloadmongo-57f97f213346b7a0305c81fd70894a77ca35a886.tar.gz
SERVER-13297: remove dead jstests
Diffstat (limited to 'jstests/mr_drop.js')
-rw-r--r--jstests/mr_drop.js42
1 files changed, 0 insertions, 42 deletions
diff --git a/jstests/mr_drop.js b/jstests/mr_drop.js
deleted file mode 100644
index 3fdd99460dd..00000000000
--- a/jstests/mr_drop.js
+++ /dev/null
@@ -1,42 +0,0 @@
-// Drop a collection while a map/reduce job is running against it. SERVER-6757
-
-// Use a different DB to prevent other tests from breaking this race-y test when run in parallel.
-// Formerly another test could take out a write lock on the DB, preventing map/reduce and drop()
-// from running until the other action completed. When the other action completed, the drop thread
-// was finished sleeping and ready to drop and would drop before map/reduce was able to start.
-t = db.getSiblingDB('MrDrop').jstests_mr_drop;
-t.drop();
-
-Random.setRandomSeed();
-
-// Set sleep times for different stages of the map/reduce job. The collection drop will occur
-// during different stages of map/reduce depending on these sleep values.
-mapSleep = Random.randInt( 4 );
-reduceSleep = Random.randInt( 4 );
-finalizeSleep = Random.randInt( 4 );
-
-// Insert some documents.
-for( i = 0; i < 10000; ++i ) {
- t.save( { key:parseInt( i / 2 ),
- mapSleep:mapSleep,
- reduceSleep:reduceSleep,
- finalizeSleep:finalizeSleep } );
-}
-db.getLastError();
-
-// Schedule a collection drop two seconds in the future.
-s = startParallelShell( "sleep( 2000 ); db.getSiblingDB('MrDrop').jstests_mr_drop.drop();" );
-
-// Run the map/reduce job. Check for command failure internally. The job succeeds even if the
-// source collection is dropped in progress.
-t.mapReduce( function() { sleep( this.mapSleep ); emit( this.key, this ); },
- function( key, vals ) { sleep( vals[ 0 ].reduceSleep ); return vals[ 0 ]; },
- { finalize:function( key, value ) { sleep( value.finalizeSleep ); return value; },
- out:'jstests_mr_drop_out' }
- );
-
-// Wait for the parallel shell to finish.
-s();
-
-// Ensure the server is still alive. Under SERVER-6757 the server can crash.
-assert( !db.getLastError() );