mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-623 cleanup
This commit is contained in:
parent
37949e561c
commit
2f796e3d2a
@ -3,14 +3,11 @@
|
||||
ports = allocatePorts( 3 );
|
||||
|
||||
var baseName = "jstests_disk_slavefromsnapshot";
|
||||
var basePath = "/data/db/" + baseName;
|
||||
|
||||
rt1 = new ReplTest( "repl_snapshot1-1", [ ports[ 0 ], ports[ 1 ] ] );
|
||||
rt2 = new ReplTest( "repl_snapshot1-2", [ ports[ 0 ], ports[ 2 ] ] );
|
||||
m = rt1.start( true );
|
||||
|
||||
//var m = startMongod( "--master", "--port", ports[ 0 ], "--dbpath", basePath + "_master", "--nohttpinterface", "--oplogSize", "1", "--smallfiles" );
|
||||
|
||||
big = new Array( 2000 ).toString();
|
||||
for( i = 0; i < 1000; ++i )
|
||||
m.getDB( baseName )[ baseName ].save( { _id: new ObjectId(), i: i, b: big } );
|
||||
@ -20,7 +17,6 @@ copyDbpath( rt1.getPath( true ), rt1.getPath( false ) );
|
||||
m.getDB( "admin" ).$cmd.sys.unlock.findOne();
|
||||
|
||||
s1 = rt1.start( false, null, true );
|
||||
//var s1 = startMongoProgram( "mongod", "--slave", "--source", "127.0.0.1:" + ports[ 0 ], "--port", ports[ 1 ], "--dbpath", basePath + "_slave1", "--nohttpinterface", "--smallfiles" );
|
||||
assert.eq( 1000, s1.getDB( baseName )[ baseName ].count() );
|
||||
m.getDB( baseName )[ baseName ].save( {i:1000} );
|
||||
assert.soon( function() { return 1001 == s1.getDB( baseName )[ baseName ].count(); } );
|
||||
@ -30,7 +26,6 @@ copyDbpath( rt1.getPath( false ), rt2.getPath( false ) );
|
||||
s1.getDB( "admin" ).$cmd.sys.unlock.findOne();
|
||||
|
||||
s2 = rt2.start( false, null, true );
|
||||
//var s2 = startMongoProgram( "mongod", "--slave", "--source", "127.0.0.1:" + ports[ 0 ], "--port", ports[ 2 ], "--dbpath", basePath + "_slave2", "--nohttpinterface", "--smallfiles" );
|
||||
assert.eq( 1001, s2.getDB( baseName )[ baseName ].count() );
|
||||
m.getDB( baseName )[ baseName ].save( {i:1001} );
|
||||
assert.soon( function() { return 1002 == s2.getDB( baseName )[ baseName ].count(); } );
|
||||
|
Loading…
Reference in New Issue
Block a user