diff options
author | Aaron <aaron@10gen.com> | 2009-05-26 18:57:26 -0400 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-05-26 18:57:26 -0400 |
commit | 10e0456be3c973377bb6f5bdc8a2e03a649ade9c (patch) | |
tree | b8f26ac850a3f990e78eb2aabd7fb90f7633665d /jstests | |
parent | b59f70aab39e7ca54ab71a88849c25760f87e830 (diff) | |
download | mongo-10e0456be3c973377bb6f5bdc8a2e03a649ade9c.tar.gz |
preserve capped-ness in clonecollection
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/clone/clonecollection.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jstests/clone/clonecollection.js b/jstests/clone/clonecollection.js index 0f5283f2eac..82cfba24a83 100644 --- a/jstests/clone/clonecollection.js +++ b/jstests/clone/clonecollection.js @@ -55,6 +55,14 @@ assert.eq( 2, t.system.indexes.find().count(), "expected index missing" ); assert.eq( 50, t.a.find( { i: 50 } ).hint( { i: 1 } ).explain().startKey.i ); assert.eq( 1, t.a.find( { i: 50 } ).hint( { i: 1 } ).toArray().length, "match length did not match expected" ); +// Check that capped-ness is preserved on clone +f.a.drop(); +t.a.drop(); + +f.createCollection( "a", {capped:true,size:1000} ); +assert( f.a.isCapped() ); +assert.commandWorked( t.cloneCollection( "localhost:" + ports[ 0 ], "a" ) ); +assert( t.a.isCapped(), "cloned collection not capped" ); // Now test insert + delete + update during clone f.a.drop(); |