summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/rollbacktests.cpp
diff options
context:
space:
mode:
authorSulabh Mahajan <sulabh.mahajan@mongodb.com>2018-06-08 14:34:55 +1000
committerSulabh Mahajan <sulabh.mahajan@mongodb.com>2018-06-08 14:34:55 +1000
commite361973f0e994d7c5da603cb6436fd96f7180127 (patch)
tree97efe6bdfd0d0bf26e1c33365d7d4682ee03ad36 /src/mongo/dbtests/rollbacktests.cpp
parente317b88bb811da53f73ddb992417ae05ea8fe451 (diff)
downloadmongo-e361973f0e994d7c5da603cb6436fd96f7180127.tar.gz
SERVER-33605 Mobile SE:Disable capped collections and related testing
Diffstat (limited to 'src/mongo/dbtests/rollbacktests.cpp')
-rw-r--r--src/mongo/dbtests/rollbacktests.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mongo/dbtests/rollbacktests.cpp b/src/mongo/dbtests/rollbacktests.cpp
index bade34cb7ea..3e6c0131b39 100644
--- a/src/mongo/dbtests/rollbacktests.cpp
+++ b/src/mongo/dbtests/rollbacktests.cpp
@@ -156,6 +156,11 @@ template <bool rollback, bool defaultIndexes, bool capped>
class CreateCollection {
public:
void run() {
+ // Skip the test if the storage engine doesn't support capped collections.
+ if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ return;
+ }
+
string ns = "unittests.rollback_create_collection";
const ServiceContext::UniqueOperationContext opCtxPtr = cc().makeOperationContext();
OperationContext& opCtx = *opCtxPtr;
@@ -187,6 +192,11 @@ template <bool rollback, bool defaultIndexes, bool capped>
class DropCollection {
public:
void run() {
+ // Skip the test if the storage engine doesn't support capped collections.
+ if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ return;
+ }
+
string ns = "unittests.rollback_drop_collection";
const ServiceContext::UniqueOperationContext opCtxPtr = cc().makeOperationContext();
OperationContext& opCtx = *opCtxPtr;
@@ -228,6 +238,11 @@ template <bool rollback, bool defaultIndexes, bool capped>
class RenameCollection {
public:
void run() {
+ // Skip the test if the storage engine doesn't support capped collections.
+ if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ return;
+ }
+
NamespaceString source("unittests.rollback_rename_collection_src");
NamespaceString target("unittests.rollback_rename_collection_dest");
const ServiceContext::UniqueOperationContext opCtxPtr = cc().makeOperationContext();
@@ -280,6 +295,11 @@ template <bool rollback, bool defaultIndexes, bool capped>
class RenameDropTargetCollection {
public:
void run() {
+ // Skip the test if the storage engine doesn't support capped collections.
+ if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ return;
+ }
+
NamespaceString source("unittests.rollback_rename_droptarget_collection_src");
NamespaceString target("unittests.rollback_rename_droptarget_collection_dest");
const ServiceContext::UniqueOperationContext opCtxPtr = cc().makeOperationContext();