diff options
author | dwight <dwight@10gen.com> | 2011-06-11 12:55:46 -0400 |
---|---|---|
committer | dwight <dwight@10gen.com> | 2011-06-11 12:55:46 -0400 |
commit | bfe34b198501dba079ecc33b2c2b36d4d60ae564 (patch) | |
tree | d8561b97e6d0e78f7de82ef33856a15597f3c071 /dbtests | |
parent | 8db6995de230148d4187e8880408c0f4bb29698a (diff) | |
download | mongo-bfe34b198501dba079ecc33b2c2b36d4d60ae564.tar.gz |
doesnt make much sense to specify capped without a size so check for that
Diffstat (limited to 'dbtests')
-rw-r--r-- | dbtests/clienttests.cpp | 2 | ||||
-rw-r--r-- | dbtests/querytests.cpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/dbtests/clienttests.cpp b/dbtests/clienttests.cpp index f51b76578a1..a64894b43c1 100644 --- a/dbtests/clienttests.cpp +++ b/dbtests/clienttests.cpp @@ -156,7 +156,7 @@ namespace ClientTests { public: Create() : Base( "Create" ) {} void run() { - db.createCollection( "unittests.clienttests.create", 0, true ); + db.createCollection( "unittests.clienttests.create", 4096, true ); BSONObj info; ASSERT( db.runCommand( "unittests", BSON( "collstats" << "clienttests.create" ), info ) ); } diff --git a/dbtests/querytests.cpp b/dbtests/querytests.cpp index e208c995173..a60a7a7898f 100644 --- a/dbtests/querytests.cpp +++ b/dbtests/querytests.cpp @@ -238,7 +238,7 @@ namespace QueryTests { } void run() { const char *ns = "unittests.querytests.ReturnOneOfManyAndTail"; - client().createCollection( ns, 0, true ); + client().createCollection( ns, 1024, true ); insert( ns, BSON( "a" << 0 ) ); insert( ns, BSON( "a" << 1 ) ); insert( ns, BSON( "a" << 2 ) ); @@ -257,7 +257,7 @@ namespace QueryTests { } void run() { const char *ns = "unittests.querytests.TailNotAtEnd"; - client().createCollection( ns, 0, true ); + client().createCollection( ns, 2047, true ); insert( ns, BSON( "a" << 0 ) ); insert( ns, BSON( "a" << 1 ) ); insert( ns, BSON( "a" << 2 ) ); @@ -282,7 +282,7 @@ namespace QueryTests { } void run() { const char *ns = "unittests.querytests.EmptyTail"; - client().createCollection( ns, 0, true ); + client().createCollection( ns, 1900, true ); auto_ptr< DBClientCursor > c = client().query( ns, Query().hint( BSON( "$natural" << 1 ) ), 2, 0, 0, QueryOption_CursorTailable ); ASSERT_EQUALS( 0, c->getCursorId() ); ASSERT( c->isDead() ); @@ -300,7 +300,7 @@ namespace QueryTests { } void run() { const char *ns = "unittests.querytests.TailableDelete"; - client().createCollection( ns, 0, true, 2 ); + client().createCollection( ns, 1300, true, 2 ); insert( ns, BSON( "a" << 0 ) ); insert( ns, BSON( "a" << 1 ) ); auto_ptr< DBClientCursor > c = client().query( ns, Query().hint( BSON( "$natural" << 1 ) ), 2, 0, 0, QueryOption_CursorTailable ); @@ -321,7 +321,7 @@ namespace QueryTests { } void run() { const char *ns = "unittests.querytests.TailableInsertDelete"; - client().createCollection( ns, 0, true ); + client().createCollection( ns, 1330, true ); insert( ns, BSON( "a" << 0 ) ); insert( ns, BSON( "a" << 1 ) ); auto_ptr< DBClientCursor > c = client().query( ns, Query().hint( BSON( "$natural" << 1 ) ), 2, 0, 0, QueryOption_CursorTailable ); @@ -366,7 +366,7 @@ namespace QueryTests { void run() { const char *ns = "unittests.querytests.TailableQueryOnId"; BSONObj info; - client().runCommand( "unittests", BSON( "create" << "querytests.TailableQueryOnId" << "capped" << true << "autoIndexId" << true ), info ); + client().runCommand( "unittests", BSON( "create" << "querytests.TailableQueryOnId" << "capped" << true << "size" << 1300 << "autoIndexId" << true ), info ); insertA( ns, 0 ); insertA( ns, 1 ); auto_ptr< DBClientCursor > c1 = client().query( ns, QUERY( "a" << GT << -1 ), 0, 0, 0, QueryOption_CursorTailable ); |