summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-05-20 14:50:33 -0400
committerEliot Horowitz <eliot@10gen.com>2009-05-20 14:50:33 -0400
commit3cebde86be21d03bd74fbbd0dd069a714e16b6da (patch)
treedad426b3cfed82a8961cb518e25c98af5c78fb8d /jstests
parentb8c6d85506d04c3b9d9b804fcf6d1e763b55f963 (diff)
downloadmongo-3cebde86be21d03bd74fbbd0dd069a714e16b6da.tar.gz
converToCappend on collection
Diffstat (limited to 'jstests')
-rw-r--r--jstests/capped3.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/capped3.js b/jstests/capped3.js
index 4bb6dcc4ea5..7c047b53d63 100644
--- a/jstests/capped3.js
+++ b/jstests/capped3.js
@@ -32,11 +32,12 @@ t2.drop();
for( i = 0; i < 1000; ++i ) {
t.save( {i:i} );
}
-assert.commandWorked( db.runCommand( { convertToCapped:"jstests_capped3", size:1000 } ) );
+//assert.commandWorked( db.runCommand( { convertToCapped:"jstests_capped3", size:1000 } ) );
+t.convertToCapped( 1000 )
c = t.find().sort( {$natural:-1} );
i = 999;
while( c.hasNext() ) {
assert.eq( i--, c.next().i );
}
assert( i < 990 );
-assert( i > 900 ); \ No newline at end of file
+assert( i > 900 );