summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/jsobjtests.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2012-06-26 08:34:39 -0400
committerEliot Horowitz <eliot@10gen.com>2012-06-26 08:34:39 -0400
commit0d1fd31650d38a64969879bd3875e38946119297 (patch)
tree92af6184b97338479562e46c6e58203873b418fb /src/mongo/dbtests/jsobjtests.cpp
parent63a957eca0eae9fc3e68bf3305bea7cf65b16985 (diff)
downloadmongo-0d1fd31650d38a64969879bd3875e38946119297.tar.gz
remove broken implementation of killing ops if socket is gone
Diffstat (limited to 'src/mongo/dbtests/jsobjtests.cpp')
-rw-r--r--src/mongo/dbtests/jsobjtests.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/mongo/dbtests/jsobjtests.cpp b/src/mongo/dbtests/jsobjtests.cpp
index b156f004621..f4a275ec28b 100644
--- a/src/mongo/dbtests/jsobjtests.cpp
+++ b/src/mongo/dbtests/jsobjtests.cpp
@@ -1726,6 +1726,34 @@ namespace JsobjTests {
}
};
+
+ class Big3 {
+ public:
+ void run() {
+ const int total = 1000 * 1000;
+ BSONObjExternalSorter sorter( indexInterfaceForTheseTests, BSONObj() , total * 2 );
+ for ( int i=0; i<total; i++ ) {
+ sorter.add( BSON( "abcabcabcabd" << "basdasdasdasdasdasdadasdasd" << "x" << i ) , 5 , i );
+ }
+
+ sorter.sort();
+
+ auto_ptr<BSONObjExternalSorter::Iterator> i = sorter.iterator();
+ int num=0;
+ double prev = 0;
+ while ( i->more() ) {
+ pair<BSONObj,DiskLoc> p = i->next();
+ num++;
+ double cur = p.first["x"].number();
+ verify( cur >= prev );
+ prev = cur;
+ }
+ verify( num == total );
+ ASSERT( sorter.numFiles() > 2 );
+ }
+ };
+
+
class D1 {
public:
void run() {
@@ -2332,6 +2360,7 @@ namespace JsobjTests {
add< external_sort::ByDiskLock >();
add< external_sort::Big1 >();
add< external_sort::Big2 >();
+ add< external_sort::Big3 >();
add< external_sort::D1 >();
add< CompatBSON >();
add< CompareDottedFieldNamesTest >();