diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2016-12-14 14:39:44 -0500 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2016-12-14 14:41:31 -0500 |
commit | 2fd5d3f6cecc0d4f8f3816031352d69ca80e5d1c (patch) | |
tree | 8350daf4d5225504853ff19f4b0117aaac805417 /src/mongo/db/storage/sorted_data_interface_test_touch.cpp | |
parent | 0590b0da70cfdad7edf8d214bbfb5d8d8b6e502e (diff) | |
download | mongo-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_touch.cpp')
-rw-r--r-- | src/mongo/db/storage/sorted_data_interface_test_touch.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/storage/sorted_data_interface_test_touch.cpp b/src/mongo/db/storage/sorted_data_interface_test_touch.cpp index a54fb010832..b83c78fa6f6 100644 --- a/src/mongo/db/storage/sorted_data_interface_test_touch.cpp +++ b/src/mongo/db/storage/sorted_data_interface_test_touch.cpp @@ -36,10 +36,11 @@ #include "mongo/unittest/unittest.h" namespace mongo { +namespace { // Verify that calling touch() on an empty index returns an OK status. TEST(SortedDataInterface, TouchEmpty) { - const std::unique_ptr<HarnessHelper> harnessHelper(newHarnessHelper()); + const auto harnessHelper(newSortedDataInterfaceHarnessHelper()); const std::unique_ptr<SortedDataInterface> sorted(harnessHelper->newSortedDataInterface(false)); { @@ -51,7 +52,7 @@ TEST(SortedDataInterface, TouchEmpty) { // Verify that calling touch() on a nonempty index returns an OK status. TEST(SortedDataInterface, TouchNonEmpty) { - const std::unique_ptr<HarnessHelper> harnessHelper(newHarnessHelper()); + const auto harnessHelper(newSortedDataInterfaceHarnessHelper()); const std::unique_ptr<SortedDataInterface> sorted(harnessHelper->newSortedDataInterface(true)); { @@ -84,4 +85,5 @@ TEST(SortedDataInterface, TouchNonEmpty) { } } +} // namespace } // namespace mongo |