0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 00:56:44 +01:00

add a couple commitIfNeeded calls to unit test. probably not important but might be helpful for 32 bit testing stability

This commit is contained in:
dwight 2011-01-15 11:01:04 -05:00
parent a860959b44
commit b7546b71c7
2 changed files with 4 additions and 1 deletions

View File

@ -192,7 +192,7 @@ namespace mongo {
_bytes += b;
#if defined(_DEBUG)
_nSinceCommitIfNeededCall++;
if( _nSinceCommitIfNeededCall >= 60 ) {
if( _nSinceCommitIfNeededCall >= 80 ) {
if( _nSinceCommitIfNeededCall % 20 == 0 )
log() << "debug nsincecommitifneeded:" << _nSinceCommitIfNeededCall << ' ' << x << " bytes " << b << endl;
}

View File

@ -90,8 +90,10 @@ namespace BtreeTests {
}
void insert( BSONObj &key ) {
bt()->bt_insert( dl(), recordLoc(), key, Ordering::make(order()), true, id(), true );
getDur().commitIfNeeded();
}
bool unindex( BSONObj &key ) {
getDur().commitIfNeeded();
return bt()->unindex( dl(), id(), key, recordLoc() );
}
static BSONObj simpleKey( char c, int n = 1 ) {
@ -512,6 +514,7 @@ namespace BtreeTests {
static DiskLoc make( IndexDetails &id ) {
DiskLoc ret = addBucket( id );
is( ret )->init();
getDur().commitIfNeeded();
return ret;
}
static ArtificialTree *is( const DiskLoc &l ) {