summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/querytests.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2020-06-12 08:42:14 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-15 11:31:00 +0000
commite1d7052125a3ca7767a81c4737628ba37077d17b (patch)
treec330644ae88efef8a088cfdeb7b4344afb233992 /src/mongo/dbtests/querytests.cpp
parenta357a44eb10fe00e3fd4378b539ef36fa9fb3ccd (diff)
downloadmongo-e1d7052125a3ca7767a81c4737628ba37077d17b.tar.gz
SERVER-48775 Make OpObserverShardingImpl to be part of sharding_runtime_d
Diffstat (limited to 'src/mongo/dbtests/querytests.cpp')
-rw-r--r--src/mongo/dbtests/querytests.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/mongo/dbtests/querytests.cpp b/src/mongo/dbtests/querytests.cpp
index 786df7534a9..6920a1dd0c5 100644
--- a/src/mongo/dbtests/querytests.cpp
+++ b/src/mongo/dbtests/querytests.cpp
@@ -54,8 +54,8 @@
#include "mongo/unittest/unittest.h"
#include "mongo/util/timer.h"
+namespace mongo {
namespace {
-namespace QueryTests {
using std::endl;
using std::string;
@@ -333,7 +333,7 @@ public:
class GetMoreKillOp : public ClientBase {
public:
~GetMoreKillOp() {
- getGlobalServiceContext()->unsetKillAllOperations();
+ _opCtx.getServiceContext()->unsetKillAllOperations();
_client.dropCollection("unittests.querytests.GetMoreKillOp");
}
void run() {
@@ -355,7 +355,7 @@ public:
// Set the killop kill all flag, forcing the next get more to fail with a kill op
// exception.
- getGlobalServiceContext()->setKillAllOperations();
+ _opCtx.getServiceContext()->setKillAllOperations();
ASSERT_THROWS_CODE(([&] {
while (cursor->more()) {
cursor->next();
@@ -365,7 +365,7 @@ public:
ErrorCodes::InterruptedAtShutdown);
// Revert the killop kill all flag.
- getGlobalServiceContext()->unsetKillAllOperations();
+ _opCtx.getServiceContext()->unsetKillAllOperations();
}
};
@@ -377,7 +377,7 @@ public:
class GetMoreInvalidRequest : public ClientBase {
public:
~GetMoreInvalidRequest() {
- getGlobalServiceContext()->unsetKillAllOperations();
+ _opCtx.getServiceContext()->unsetKillAllOperations();
_client.dropCollection("unittests.querytests.GetMoreInvalidRequest");
}
void run() {
@@ -456,7 +456,7 @@ public:
}
void run() {
// Skip the test if the storage engine doesn't support capped collections.
- if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ if (!_opCtx.getServiceContext()->getStorageEngine()->supportsCappedCollections()) {
return;
}
@@ -491,7 +491,7 @@ public:
}
void run() {
// Skip the test if the storage engine doesn't support capped collections.
- if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ if (!_opCtx.getServiceContext()->getStorageEngine()->supportsCappedCollections()) {
return;
}
@@ -524,7 +524,7 @@ public:
}
void run() {
// Skip the test if the storage engine doesn't support capped collections.
- if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ if (!_opCtx.getServiceContext()->getStorageEngine()->supportsCappedCollections()) {
return;
}
@@ -556,7 +556,7 @@ public:
}
void run() {
// Skip the test if the storage engine doesn't support capped collections.
- if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ if (!_opCtx.getServiceContext()->getStorageEngine()->supportsCappedCollections()) {
return;
}
@@ -590,7 +590,7 @@ public:
}
void run() {
// Skip the test if the storage engine doesn't support capped collections.
- if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ if (!_opCtx.getServiceContext()->getStorageEngine()->supportsCappedCollections()) {
return;
}
@@ -646,7 +646,7 @@ public:
void run() {
// Skip the test if the storage engine doesn't support capped collections.
- if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ if (!_opCtx.getServiceContext()->getStorageEngine()->supportsCappedCollections()) {
return;
}
@@ -693,7 +693,7 @@ public:
}
void run() {
// Skip the test if the storage engine doesn't support capped collections.
- if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ if (!_opCtx.getServiceContext()->getStorageEngine()->supportsCappedCollections()) {
return;
}
@@ -706,7 +706,7 @@ public:
//
// To ensure we are working with a clean oplog (an oplog without entries), we resort
// to truncating the oplog instead.
- if (getGlobalServiceContext()->getStorageEngine()->supportsRecoveryTimestamp()) {
+ if (_opCtx.getServiceContext()->getStorageEngine()->supportsRecoveryTimestamp()) {
BSONObj info;
_client.runCommand("local",
BSON("emptycapped"
@@ -749,7 +749,7 @@ public:
}
void run() {
// Skip the test if the storage engine doesn't support capped collections.
- if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ if (!_opCtx.getServiceContext()->getStorageEngine()->supportsCappedCollections()) {
return;
}
@@ -762,7 +762,7 @@ public:
//
// To ensure we are working with a clean oplog (an oplog without entries), we resort
// to truncating the oplog instead.
- if (getGlobalServiceContext()->getStorageEngine()->supportsRecoveryTimestamp()) {
+ if (_opCtx.getServiceContext()->getStorageEngine()->supportsRecoveryTimestamp()) {
BSONObj info;
_client.runCommand("local",
BSON("emptycapped"
@@ -1382,7 +1382,7 @@ public:
}
void run() {
// Skip the test if the storage engine doesn't support capped collections.
- if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ if (!_opCtx.getServiceContext()->getStorageEngine()->supportsCappedCollections()) {
return;
}
@@ -1538,7 +1538,7 @@ public:
void run() {
// Skip the test if the storage engine doesn't support capped collections.
- if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ if (!_opCtx.getServiceContext()->getStorageEngine()->supportsCappedCollections()) {
return;
}
@@ -1555,7 +1555,7 @@ public:
//
// To ensure we are working with a clean oplog (an oplog without entries), we resort
// to truncating the oplog instead.
- if (getGlobalServiceContext()->getStorageEngine()->supportsRecoveryTimestamp()) {
+ if (_opCtx.getServiceContext()->getStorageEngine()->supportsRecoveryTimestamp()) {
_client.runCommand("local",
BSON("emptycapped"
<< "oplog.querytests.findingstart"),
@@ -1605,7 +1605,7 @@ public:
void run() {
// Skip the test if the storage engine doesn't support capped collections.
- if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ if (!_opCtx.getServiceContext()->getStorageEngine()->supportsCappedCollections()) {
return;
}
@@ -1624,7 +1624,7 @@ public:
//
// To ensure we are working with a clean oplog (an oplog without entries), we resort
// to truncating the oplog instead.
- if (getGlobalServiceContext()->getStorageEngine()->supportsRecoveryTimestamp()) {
+ if (_opCtx.getServiceContext()->getStorageEngine()->supportsRecoveryTimestamp()) {
_client.runCommand("local",
BSON("emptycapped"
<< "oplog.querytests.findingstart"),
@@ -1670,7 +1670,7 @@ public:
void run() {
// Skip the test if the storage engine doesn't support capped collections.
- if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ if (!_opCtx.getServiceContext()->getStorageEngine()->supportsCappedCollections()) {
return;
}
@@ -1698,7 +1698,7 @@ public:
//
// To ensure we are working with a clean oplog (an oplog without entries), we resort
// to truncating the oplog instead.
- if (getGlobalServiceContext()->getStorageEngine()->supportsRecoveryTimestamp()) {
+ if (_opCtx.getServiceContext()->getStorageEngine()->supportsRecoveryTimestamp()) {
_client.runCommand("local",
BSON("emptycapped"
<< "oplog.querytests.findingstart"),
@@ -1908,7 +1908,7 @@ public:
Exhaust() : CollectionInternalBase("exhaust") {}
void run() {
// Skip the test if the storage engine doesn't support capped collections.
- if (!getGlobalServiceContext()->getStorageEngine()->supportsCappedCollections()) {
+ if (!_opCtx.getServiceContext()->getStorageEngine()->supportsCappedCollections()) {
return;
}
@@ -2066,5 +2066,5 @@ public:
OldStyleSuiteInitializer<All> myall;
-} // namespace QueryTests
} // namespace
+} // namespace mongo