diff options
author | Eric Milkie <milkie@10gen.com> | 2012-05-18 09:18:41 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2012-05-18 14:43:55 -0400 |
commit | 161960373175779914c093be70fa06dde3b60909 (patch) | |
tree | b53bad4d2925914506eb3286c59062bbc3d43191 /jstests/repl | |
parent | 76609617aa70abd9433a4443ac667e831082e868 (diff) | |
download | mongo-161960373175779914c093be70fa06dde3b60909.tar.gz |
SERVER-5040 better test, use replsets instead of master/slave
Diffstat (limited to 'jstests/repl')
-rw-r--r-- | jstests/repl/repl22.js | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/jstests/repl/repl22.js b/jstests/repl/repl22.js deleted file mode 100644 index b5ab92367cc..00000000000 --- a/jstests/repl/repl22.js +++ /dev/null @@ -1,40 +0,0 @@ - -// test for SERVER-5040 - if documents move forward during an initial sync. - -if ( 0 ) { // SERVER-5040 - -rt = new ReplTest( "repl22tests" ); - -master = rt.start( true ); -md = master.getDB( 'd' ); -mdc = md[ 'c' ]; - -for( i = 0; i < 1000000; ++i ) { - mdc.insert( { _id:i, x:i } ); -} -md.getLastError(); - -mdc.ensureIndex( { x : 1 }, { unique: true } ); -md.getLastError(); - -slave = rt.start( false ); -sc = slave.getDB( 'd' )[ 'c' ]; - -// Wait for slave to start cloning. -assert.soon( function() { c = sc.count(); /*print( c );*/ return c > 0; } ); - -// Move first document to the end by growing it -mdc.remove( { _id:1, x:1 } ); -mdc.insert( { _id:1000001, x:1, bigstring: "ayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayay" } ); -md.getLastError(); - -mdc.insert( { _id:'sentinel' } ); -md.getLastError(); - -// Wait for replication to catch up. -assert.soon( function() { return sc.count( { _id:'sentinel' } ) > 0; } ); - -// Do we have an index? -assert.eq (1, slave.getDB( 'd' )['system.indexes'] - .find({"v" : 1,"key" : {"x" : 1},"unique" : true,"ns" : "d.c","name" : "x_1"}).count()); -} |