summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/indexupdatetests.cpp
diff options
context:
space:
mode:
authorErnie Hershey <ernie.hershey@10gen.com>2015-05-18 17:23:31 -0400
committerErnie Hershey <ernie.hershey@10gen.com>2015-05-18 17:23:31 -0400
commitd3fda5afd4f1d65f03e0e3ef01ffb82e4f60ce26 (patch)
tree831c13c2d1d05930af0db973b1827474cc37f81e /src/mongo/dbtests/indexupdatetests.cpp
parenta3046362af4cb79a714c95783ca66f87f4d5a827 (diff)
downloadmongo-d3fda5afd4f1d65f03e0e3ef01ffb82e4f60ce26.tar.gz
Revert "Revert "SERVER-18515 Replace OperationContext::getCurOp with CurOp::get(OperationContext*)""
This reverts commit 7147e127644cba2bfa292945557b43664cc31f47.
Diffstat (limited to 'src/mongo/dbtests/indexupdatetests.cpp')
-rw-r--r--src/mongo/dbtests/indexupdatetests.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mongo/dbtests/indexupdatetests.cpp b/src/mongo/dbtests/indexupdatetests.cpp
index cf01a43a9b1..a9cda7a01b6 100644
--- a/src/mongo/dbtests/indexupdatetests.cpp
+++ b/src/mongo/dbtests/indexupdatetests.cpp
@@ -175,7 +175,7 @@ namespace IndexUpdateTests {
nDocs,
nDocs));
// Register a request to kill the current operation.
- txn.getCurOp()->kill();
+ CurOp::get(txn)->kill();
if ( _mayInterrupt ) {
// Add keys to phaseOne.
ASSERT_THROWS( BtreeBasedBuilder::addKeysToPhaseOne( collection(),
@@ -225,7 +225,7 @@ namespace IndexUpdateTests {
phaseOne.sorter->sort( false );
// Set up remaining arguments.
set<RecordId> dups;
- CurOp* op = txn.getCurOp();
+ CurOp* op = CurOp::get(txn);
ProgressMeterHolder pm (op->setMessage("BuildBottomUp",
"BuildBottomUp Progress",
nKeys,
@@ -291,7 +291,7 @@ namespace IndexUpdateTests {
phaseOne.sorter->sort( false );
// Set up remaining arguments.
set<RecordId> dups;
- CurOp* op = txn.getCurOp();
+ CurOp* op = CurOp::get(txn);
ProgressMeterHolder pm (op->setMessage("InterruptBuildBottomUp",
"InterruptBuildBottomUp Progress",
nKeys,
@@ -301,7 +301,7 @@ namespace IndexUpdateTests {
// The index's root has not yet been set.
ASSERT( id->getHead().isNull() );
// Register a request to kill the current operation.
- txn.getCurOp()->kill();
+ CurOp::get(txn)->kill();
if ( _mayInterrupt ) {
// The build is aborted due to the kill request.
ASSERT_THROWS
@@ -483,7 +483,7 @@ namespace IndexUpdateTests {
wunit.commit();
}
// Initialize curop.
- _txn.getCurOp()->reset();
+ CurOp::get(_txn)->reset();
// Request an interrupt.
getGlobalServiceContext()->setKillAllOperations();
BSONObj indexInfo = BSON( "key" << BSON( "a" << 1 ) << "ns" << _ns << "name" << "a_1" );
@@ -516,7 +516,7 @@ namespace IndexUpdateTests {
wunit.commit();
}
// Initialize curop.
- _txn.getCurOp()->reset();
+ CurOp::get(_txn)->reset();
// Request an interrupt.
getGlobalServiceContext()->setKillAllOperations();
BSONObj indexInfo = BSON( "key" << BSON( "a" << 1 ) << "ns" << _ns << "name" << "a_1" );
@@ -552,7 +552,7 @@ namespace IndexUpdateTests {
wunit.commit();
}
// Initialize curop.
- _txn.getCurOp()->reset();
+ CurOp::get(_txn)->reset();
// Request an interrupt.
getGlobalServiceContext()->setKillAllOperations();
BSONObj indexInfo = BSON( "key" << BSON( "_id" << 1 ) <<
@@ -590,7 +590,7 @@ namespace IndexUpdateTests {
wunit.commit();
}
// Initialize curop.
- _txn.getCurOp()->reset();
+ CurOp::get(_txn)->reset();
// Request an interrupt.
getGlobalServiceContext()->setKillAllOperations();
BSONObj indexInfo = BSON( "key" << BSON( "_id" << 1 ) <<
@@ -617,7 +617,7 @@ namespace IndexUpdateTests {
// Start with just _id
ASSERT_EQUALS( 1U, _client.getIndexSpecs(_ns).size());
// Initialize curop.
- _txn.getCurOp()->reset();
+ CurOp::get(_txn)->reset();
// Request an interrupt.
getGlobalServiceContext()->setKillAllOperations();
// The call is not interrupted.