Permalink
Browse files

fix capped test

  • Loading branch information...
1 parent abf6327 commit d2092af24507de48d496354eedf8e190abf7b7e1 @erh erh committed Aug 5, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −2 jstests/capped2.js
  2. +0 −1 jstests/capped5.js
  3. 0 jstests/{scan_capped_id.js → cappeda.js}
View
@@ -47,7 +47,7 @@ function checkDecreasing( i ) {
for( i = 0 ;; ++i ) {
debug( "capped 2: " + i );
- tzz.save( val[ i ] );
+ tzz.insert( val[ i ] );
if ( tzz.count() == 0 ) {
assert( i > 100, "K" );
break;
@@ -57,6 +57,6 @@ for( i = 0 ;; ++i ) {
for( i = 600 ; i >= 0 ; --i ) {
debug( "capped 2: " + i );
- tzz.save( val[ i ] );
+ tzz.insert( val[ i ] );
checkDecreasing( i );
}
View
@@ -9,7 +9,6 @@ db.createCollection( tn , {capped: true, size: 1024 * 1024 * 1 } );
t.insert( { _id : 5 , x : 11 , z : 52 } );
assert.eq( 0 , t.getIndexKeys().length , "A0" )
assert.eq( 52 , t.findOne( { x : 11 } ).z , "A1" );
-assert.eq( 52 , t.findOne( { _id : 5, x : 11 } ).z , "A2" );
t.ensureIndex( { _id : 1 } )
t.ensureIndex( { x : 1 } )
File renamed without changes.

0 comments on commit d2092af

Please sign in to comment.