summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/pdfiletests.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2014-09-30 18:36:07 -0400
committerMathias Stearn <mathias@10gen.com>2014-10-01 16:51:15 -0400
commit969bdb73f9712bebb44fe56959101914c5e12631 (patch)
treef019060da42f07023fbee50b8affd464d3c39663 /src/mongo/dbtests/pdfiletests.cpp
parent9f4ebf0e4f61a6b64a20f7d400eb34d71fb8ea64 (diff)
downloadmongo-969bdb73f9712bebb44fe56959101914c5e12631.tar.gz
SERVER-13635 Move mmapv1 specific dbtests to mmaptest and skip if using other engine
Diffstat (limited to 'src/mongo/dbtests/pdfiletests.cpp')
-rw-r--r--src/mongo/dbtests/pdfiletests.cpp50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/mongo/dbtests/pdfiletests.cpp b/src/mongo/dbtests/pdfiletests.cpp
index 5f154456423..9d0cb433be4 100644
--- a/src/mongo/dbtests/pdfiletests.cpp
+++ b/src/mongo/dbtests/pdfiletests.cpp
@@ -35,10 +35,6 @@
#include "mongo/db/json.h"
#include "mongo/db/ops/insert.h"
#include "mongo/db/catalog/collection.h"
-#include "mongo/db/storage/mmap_v1/data_file.h"
-#include "mongo/db/storage/mmap_v1/extent.h"
-#include "mongo/db/storage/mmap_v1/extent_manager.h"
-#include "mongo/db/storage/mmap_v1/mmap_v1_extent_manager.h"
#include "mongo/db/operation_context_impl.h"
#include "mongo/dbtests/dbtests.h"
@@ -154,51 +150,6 @@ namespace PdfileTests {
};
} // namespace Insert
- class ExtentSizing {
- public:
- void run() {
- MmapV1ExtentManager em( "x", "x", false );
-
- ASSERT_EQUALS( em.maxSize(), em.quantizeExtentSize( em.maxSize() ) );
-
- // test that no matter what we start with, we always get to max extent size
- for ( int obj=16; obj<BSONObjMaxUserSize; obj += 111 ) {
-
- int sz = em.initialSize( obj );
-
- double totalExtentSize = sz;
-
- int numFiles = 1;
- int sizeLeftInExtent = em.maxSize() - 1;
-
- for ( int i=0; i<100; i++ ) {
- sz = em.followupSize( obj , sz );
- ASSERT( sz >= obj );
- ASSERT( sz >= em.minSize() );
- ASSERT( sz <= em.maxSize() );
- ASSERT( sz <= em.maxSize() );
-
- totalExtentSize += sz;
-
- if ( sz < sizeLeftInExtent ) {
- sizeLeftInExtent -= sz;
- }
- else {
- numFiles++;
- sizeLeftInExtent = em.maxSize() - sz;
- }
- }
- ASSERT_EQUALS( em.maxSize(), sz );
-
- double allocatedOnDisk = (double)numFiles * em.maxSize();
-
- ASSERT( ( totalExtentSize / allocatedOnDisk ) > .95 );
-
- invariant( em.numFiles() == 0 );
- }
- }
- };
-
class All : public Suite {
public:
All() : Suite( "pdfile" ) {}
@@ -208,7 +159,6 @@ namespace PdfileTests {
add< Insert::UpdateDate >();
add< Insert::UpdateDate2 >();
add< Insert::ValidId >();
- add< ExtentSizing >();
}
} myall;