summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/sorted_data_interface_test_rollback.cpp
diff options
context:
space:
mode:
authorADAM David Alan Martin <adam.martin@10gen.com>2016-12-14 14:39:44 -0500
committerADAM David Alan Martin <adam.martin@10gen.com>2016-12-14 14:41:31 -0500
commit2fd5d3f6cecc0d4f8f3816031352d69ca80e5d1c (patch)
tree8350daf4d5225504853ff19f4b0117aaac805417 /src/mongo/db/storage/sorted_data_interface_test_rollback.cpp
parent0590b0da70cfdad7edf8d214bbfb5d8d8b6e502e (diff)
downloadmongo-2fd5d3f6cecc0d4f8f3816031352d69ca80e5d1c.tar.gz
SERVER-27257 Deduplicate symbol `newHarnessHelper`
The `newHarnessHelper` function was defined by multiple test driver modules, each one specializing it to return a specific kind of storage test driver's `HarnessHelper`. The two different kinds of `HarnessHelper` class were given a common base class, and the `newHarnessHelper` function was changed to a single implementation. This new implementation returns the results of a `HarnessHelper` factory function which can be registered by a MONGO_INITIALIZER statement.
Diffstat (limited to 'src/mongo/db/storage/sorted_data_interface_test_rollback.cpp')
-rw-r--r--src/mongo/db/storage/sorted_data_interface_test_rollback.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/storage/sorted_data_interface_test_rollback.cpp b/src/mongo/db/storage/sorted_data_interface_test_rollback.cpp
index fe980b0f129..a6e5cff31db 100644
--- a/src/mongo/db/storage/sorted_data_interface_test_rollback.cpp
+++ b/src/mongo/db/storage/sorted_data_interface_test_rollback.cpp
@@ -36,11 +36,12 @@
#include "mongo/unittest/unittest.h"
namespace mongo {
+namespace {
// Insert multiple keys and verify that omitting the commit()
// on the WriteUnitOfWork causes the changes to not become visible.
TEST(SortedDataInterface, InsertWithoutCommit) {
- const std::unique_ptr<HarnessHelper> harnessHelper(newHarnessHelper());
+ const auto harnessHelper(newSortedDataInterfaceHarnessHelper());
const std::unique_ptr<SortedDataInterface> sorted(harnessHelper->newSortedDataInterface(true));
{
@@ -82,7 +83,7 @@ TEST(SortedDataInterface, InsertWithoutCommit) {
// omitting the commit() on the WriteUnitOfWork causes the changes to
// not become visible.
TEST(SortedDataInterface, UnindexWithoutCommit) {
- const std::unique_ptr<HarnessHelper> harnessHelper(newHarnessHelper());
+ const auto harnessHelper(newSortedDataInterfaceHarnessHelper());
const std::unique_ptr<SortedDataInterface> sorted(harnessHelper->newSortedDataInterface(false));
{
@@ -152,4 +153,5 @@ TEST(SortedDataInterface, UnindexWithoutCommit) {
}
}
+} // namespace
} // namespace mongo