diff options
Diffstat (limited to 'jstests/mmap_v1')
-rw-r--r-- | jstests/mmap_v1/capped2.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/jstests/mmap_v1/capped2.js b/jstests/mmap_v1/capped2.js index 65bb82f4c07..3ecb6c219b0 100644 --- a/jstests/mmap_v1/capped2.js +++ b/jstests/mmap_v1/capped2.js @@ -48,13 +48,21 @@ function checkDecreasing( i ) { for( i = 0 ;; ++i ) { debug( "capped 2: " + i ); tzz.insert( val[ i ] ); - if ( tzz.count() == 0 ) { + var err = db.getLastError(); + if ( err ) { + debug(err); + debug(tzz.count()); assert( i > 100, "K" ); break; } checkIncreasing( i ); } +// drop and recreate. Test used to rely on the last insert emptying the collection, which it no +// longer does now that we rollback on failed inserts. +tzz.drop(); +db._dbCommand( { create: "capped2", capped: true, size: 1000, $nExtents: 11, autoIndexId: false } ); + for( i = 600 ; i >= 0 ; --i ) { debug( "capped 2: " + i ); tzz.insert( val[ i ] ); |