diff options
author | Aaron <aaron@10gen.com> | 2009-05-21 11:07:11 -0400 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-05-21 11:07:11 -0400 |
commit | 7552a7ccb5426515e3f0b3001fad8cd4ada3d126 (patch) | |
tree | f73ce8840a7e9a3e8d3fce3ae31dfad9b54682fc /jstests/repl/repl8.js | |
parent | f1ff2f1a57f466983b138024264b31ce6748be74 (diff) | |
download | mongo-7552a7ccb5426515e3f0b3001fad8cd4ada3d126.tar.gz |
fix op logging for collection creation and for convertToCapped
Diffstat (limited to 'jstests/repl/repl8.js')
-rw-r--r-- | jstests/repl/repl8.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/jstests/repl/repl8.js b/jstests/repl/repl8.js index e7d1f12f54a..37d247d7bb5 100644 --- a/jstests/repl/repl8.js +++ b/jstests/repl/repl8.js @@ -15,3 +15,16 @@ assert.soon( function() { return s.getDB( baseName ).getCollection( "first" ).is m.getDB( baseName ).createCollection( "second", {capped:true,size:1000} ); assert.soon( function() { return s.getDB( baseName ).getCollection( "second" ).isCapped(); } ); + +m.getDB( baseName ).getCollection( "third" ).save( { a: 1 } ); +assert.soon( function() { return s.getDB( baseName ).getCollection( "third" ).exists(); } ); +assert.commandWorked( m.getDB( "admin" ).runCommand( {renameCollection:"jstests_repl_repl8.third", to:"jstests_repl_repl8.third_rename"} ) ); +assert( m.getDB( baseName ).getCollection( "third_rename" ).exists() ); +assert( !m.getDB( baseName ).getCollection( "third" ).exists() ); +assert.soon( function() { return s.getDB( baseName ).getCollection( "third_rename" ).exists(); } ); +assert.soon( function() { return !s.getDB( baseName ).getCollection( "third" ).exists(); } ); + +m.getDB( baseName ).getCollection( "fourth" ).save( {a:1} ); +assert.commandWorked( m.getDB( baseName ).getCollection( "fourth" ).convertToCapped( 1000 ) ); +assert( m.getDB( baseName ).getCollection( "fourth" ).isCapped() ); +assert.soon( function() { return s.getDB( baseName ).getCollection( "fourth" ).isCapped(); } ); |