Skip to content

Commit

Permalink
include check for collection created before slave starts
Browse files Browse the repository at this point in the history
  • Loading branch information
astaple committed May 20, 2009
1 parent 6bdab5f commit 58fd314
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions jstests/repl/repl8.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ baseName = "jstests_repl_repl8";
ports = allocatePorts( 2 );

m = startMongod( "--port", ports[ 0 ], "--dbpath", "/data/db/" + baseName + "-master", "--master", "--oplogSize", "1", "--nohttpinterface", "--bind_ip", "127.0.0.1" );

m.getDB( baseName ).createCollection( "first", {capped:true,size:1000} );
assert( m.getDB( baseName ).getCollection( "first" ).isCapped() );

s = startMongod( "--port", ports[ 1 ], "--dbpath", "/data/db/" + baseName + "-slave", "--slave", "--source", "127.0.0.1:" + ports[ 0 ], "--nohttpinterface", "--bind_ip", "127.0.0.1" );

m.getDB( baseName ).createCollection( baseName, {capped:true,size:1000} );
assert.soon( function() { return s.getDB( baseName ).getCollection( baseName ).isCapped(); } );
assert.soon( function() { return s.getDB( baseName ).getCollection( "first" ).isCapped(); } );

m.getDB( baseName ).createCollection( "second", {capped:true,size:1000} );
assert.soon( function() { return s.getDB( baseName ).getCollection( "second" ).isCapped(); } );

0 comments on commit 58fd314

Please sign in to comment.