summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/databases_cloner_test.cpp
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2018-03-06 20:17:44 -0500
committerBenety Goh <benety@mongodb.com>2018-03-06 20:17:44 -0500
commit01a89a37332c7c5bd9892f6fbd4082c9f9e9462d (patch)
treed7285545300c88e822502cbc091f087e52da5128 /src/mongo/db/repl/databases_cloner_test.cpp
parentd368f071651856039f2637202c122b1a55a44142 (diff)
downloadmongo-01a89a37332c7c5bd9892f6fbd4082c9f9e9462d.tar.gz
SERVER-33625 replace use of OldThreadPool in cloners and TaskRunner with ThreadPool
Diffstat (limited to 'src/mongo/db/repl/databases_cloner_test.cpp')
-rw-r--r--src/mongo/db/repl/databases_cloner_test.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mongo/db/repl/databases_cloner_test.cpp b/src/mongo/db/repl/databases_cloner_test.cpp
index 3705afed383..369b8a27c38 100644
--- a/src/mongo/db/repl/databases_cloner_test.cpp
+++ b/src/mongo/db/repl/databases_cloner_test.cpp
@@ -43,8 +43,8 @@
#include "mongo/stdx/mutex.h"
#include "mongo/unittest/task_executor_proxy.h"
#include "mongo/unittest/unittest.h"
-#include "mongo/util/concurrency/old_thread_pool.h"
#include "mongo/util/concurrency/thread_name.h"
+#include "mongo/util/concurrency/thread_pool.h"
#include "mongo/util/mongoutils/str.h"
#include "mongo/util/scopeguard.h"
@@ -79,14 +79,13 @@ struct StorageInterfaceResults {
class DBsClonerTest : public executor::ThreadPoolExecutorTest {
public:
- DBsClonerTest()
- : _storageInterface{}, _dbWorkThreadPool{OldThreadPool::DoNotStartThreadsTag(), 1} {}
+ DBsClonerTest() : _storageInterface{}, _dbWorkThreadPool(ThreadPool::Options()) {}
StorageInterface& getStorage() {
return _storageInterface;
}
- OldThreadPool& getDbWorkThreadPool() {
+ ThreadPool& getDbWorkThreadPool() {
return _dbWorkThreadPool;
}
@@ -186,13 +185,12 @@ protected:
std::unique_ptr<CollectionBulkLoader>(collInfo->loader));
};
- _dbWorkThreadPool.startThreads();
+ _dbWorkThreadPool.startup();
}
void tearDown() override {
getExecutor().shutdown();
getExecutor().join();
- _dbWorkThreadPool.join();
}
/**
@@ -330,7 +328,7 @@ protected:
StorageInterfaceMock _storageInterface;
private:
- OldThreadPool _dbWorkThreadPool;
+ ThreadPool _dbWorkThreadPool;
std::map<NamespaceString, CollectionMockStats> _collectionStats;
std::map<NamespaceString, CollectionCloneInfo> _collections;
StorageInterfaceResults _storageInterfaceWorkDone;