0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
mongodb/jstests/noPassthrough/split_collections_and_indexes.js
Ramon Fernandez 85fcc6daad SERVER-16811 Register wiredTiger factory once.
This change removes support for the use of the "wiredtiger" name (note
lowercase t) for the Wired Tiger storage engine. From now on only the
"wiredTiger" name is supported.
2015-01-15 16:50:58 -05:00

41 lines
1.2 KiB
JavaScript

if ( jsTest.options().storageEngine == "wiredTiger" ) {
var baseDir = "jstests_split_c_and_i";
port = allocatePorts( 1 )[ 0 ];
dbpath = MongoRunner.dataPath + baseDir + "/";
var m = MongoRunner.runMongod({
dbpath: dbpath,
port: port,
wiredTigerDirectoryForIndexes: ''});
db = m.getDB( "foo" );
db.bar.insert( { x : 1 } );
assert.eq( 1, db.bar.count() );
db.adminCommand( {fsync:1} );
assert( listFiles( dbpath + "/index" ).length > 0 );
assert( listFiles( dbpath + "/collection" ).length > 0 );
MongoRunner.stopMongod(port);
// Subsequent attempts to start server using same dbpath but different
// wiredTigerDirectoryForIndexes and directoryperdb options should fail.
assert.isnull(MongoRunner.runMongod({
dbpath: dbpath,
port: port,
restart: true}));
assert.isnull(MongoRunner.runMongod({
dbpath: dbpath,
port: port,
restart: true,
directoryperdb: ''}));
assert.isnull(MongoRunner.runMongod({
dbpath: dbpath,
port: port,
restart: true,
wiredTigerDirectoryForIndexes: '',
directoryperdb: ''}));
}