summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim OLeary <jim.oleary@gmail.com>2022-06-02 16:53:17 +0100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-06-02 18:14:59 +0000
commita1aea073949549618cdde2c7c427270889278ba4 (patch)
tree1db330fdb9c4513b9d3676387787e08832d8bb37 /src
parent366e8de6d0daa36ee3f60961c5daad7c76f03769 (diff)
downloadmongo-a1aea073949549618cdde2c7c427270889278ba4.tar.gz
Revert "Import wiredtiger: 2772ccb8f2ca816458afa76ff270adb7163f2f4a from branch mongodb-master"
This reverts commit 5875daf4a717afe0489674a8a1178f14e714d4e7.
Diffstat (limited to 'src')
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/README.md1
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/src/component/op_tracker.cpp65
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/checkpoint_manager.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/checkpoint_manager.cpp)12
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/checkpoint_manager.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/checkpoint_manager.h)5
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/connection_manager.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/storage/connection_manager.cpp)9
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/connection_manager.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/storage/connection_manager.h)7
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/core/component.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/component.cpp)4
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/core/component.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/component.h)8
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/core/configuration.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/main/configuration.cpp)8
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/core/configuration.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/main/configuration.h)4
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/core/op_tracker.cpp37
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/core/op_tracker.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/op_tracker.h)7
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/core/throttle.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/main/throttle.cpp)10
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/core/throttle.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/main/throttle.h)3
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/runtime_monitor.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/runtime_monitor.cpp)18
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/runtime_monitor.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/runtime_monitor.h)16
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/test.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/main/test.cpp)16
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/test.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/main/test.h)18
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/thread_manager.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/common/thread_manager.cpp)3
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/thread_manager.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/common/thread_manager.h)0
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/timestamp_manager.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/timestamp_manager.cpp)13
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/timestamp_manager.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/timestamp_manager.h)8
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/util/api_const.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/common/api_const.cpp)0
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/util/api_const.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/common/api_const.h)0
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/util/logger.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/common/logger.cpp)8
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/util/logger.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/common/logger.h)12
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/util/perf_plotter.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/perf_plotter.cpp)1
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/util/perf_plotter.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/perf_plotter.h)4
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_connection.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_connection.cpp)5
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_connection.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_connection.h)4
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_types.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_types.cpp)7
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_types.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_types.h)4
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_model.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/main/database_model.cpp)12
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_model.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/main/database_model.h)7
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_operation.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/main/database_operation.cpp)16
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_operation.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/main/database_operation.h)0
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/workload/random_generator.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/common/random_generator.cpp)1
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/workload/random_generator.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/common/random_generator.h)0
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/workload/thread_context.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/main/thread_context.cpp)10
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/workload/thread_context.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/main/thread_context.h)16
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_tracking.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/workload_tracking.cpp)8
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_tracking.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/workload_tracking.h)6
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_validation.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/workload_validation.cpp)7
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_validation.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/workload_validation.h)6
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/workload_generator.cpp (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/workload_generator.cpp)17
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/test_harness/workload_generator.h (renamed from src/third_party/wiredtiger/test/cppsuite/src/component/workload_generator.h)16
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/tests/bounded_cursor_perf.cpp11
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/tests/burst_inserts.cpp5
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/tests/cache_resize.cpp20
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/tests/csuite_style_example_test.cpp13
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/tests/cursor_bound_01.cpp12
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/tests/hs_cleanup.cpp5
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/tests/operations_test.cpp8
-rwxr-xr-xsrc/third_party/wiredtiger/test/cppsuite/tests/run.cpp10
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/tests/search_near_01.cpp25
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/tests/search_near_02.cpp18
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/tests/search_near_03.cpp18
-rw-r--r--src/third_party/wiredtiger/test/cppsuite/tests/test_template.cpp24
59 files changed, 307 insertions, 303 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index f81039a2f49..332be71af57 100644
--- a/src/third_party/wiredtiger/import.data
+++ b/src/third_party/wiredtiger/import.data
@@ -2,5 +2,5 @@
"vendor": "wiredtiger",
"github": "wiredtiger/wiredtiger.git",
"branch": "mongodb-master",
- "commit": "2772ccb8f2ca816458afa76ff270adb7163f2f4a"
+ "commit": "d1d727c13a756f0a4f7895f7bf77167610d4c4c1"
}
diff --git a/src/third_party/wiredtiger/test/cppsuite/README.md b/src/third_party/wiredtiger/test/cppsuite/README.md
deleted file mode 100644
index 26c95664ab3..00000000000
--- a/src/third_party/wiredtiger/test/cppsuite/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# WiredTiger cppsuite
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/op_tracker.cpp b/src/third_party/wiredtiger/test/cppsuite/src/component/op_tracker.cpp
deleted file mode 100644
index f40cfc22479..00000000000
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/op_tracker.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * Public Domain 2014-present MongoDB, Inc.
- * Public Domain 2008-2014 WiredTiger, Inc.
- *
- * This is free and unencumbered software released into the public domain.
- *
- * Anyone is free to copy, modify, publish, use, compile, sell, or
- * distribute this software, either in source code form or as a compiled
- * binary, for any purpose, commercial or non-commercial, and by any
- * means.
- *
- * In jurisdictions that recognize copyright laws, the author or authors
- * of this software dedicate any and all copyright interest in the
- * software to the public domain. We make this dedication for the benefit
- * of the public at large and to the detriment of our heirs and
- * successors. We intend this dedication to be an overt act of
- * relinquishment in perpetuity of all present and future rights to this
- * software under copyright law.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "op_tracker.h"
-
-#include "perf_plotter.h"
-
-namespace test_harness {
-op_tracker::op_tracker(const std::string id, const std::string &test_name)
- : _id(id), _test_name(test_name), _it_count(0), _total_time_taken(0)
-{
-}
-
-void
-op_tracker::append_stats()
-{
- uint64_t avg = (uint64_t)_total_time_taken / _it_count;
- std::string stat = "{\"name\":\"" + _id + "\",\"value\":" + std::to_string(avg) + "}";
- perf_plotter::instance().add_stat(stat);
-}
-
-template <typename T>
-auto
-op_tracker::track(T lambda)
-{
- auto _start_time = std::chrono::steady_clock::now();
- int ret = lambda();
- auto _end_time = std::chrono::steady_clock::now();
- _total_time_taken += (_end_time - _start_time).count();
- _it_count += 1;
-
- return ret;
-}
-
-op_tracker::~op_tracker()
-{
- if (_it_count != 0)
- append_stats();
-}
-}; // namespace test_harness
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/checkpoint_manager.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/checkpoint_manager.cpp
index ba8de32a03f..66836325acf 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/checkpoint_manager.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/checkpoint_manager.cpp
@@ -27,15 +27,9 @@
*/
#include "checkpoint_manager.h"
-
-#include "src/common/api_const.h"
-#include "src/common/logger.h"
-#include "src/main/configuration.h"
-#include "src/storage/connection_manager.h"
-
-extern "C" {
-#include "test_util.h"
-}
+#include "connection_manager.h"
+#include "util/api_const.h"
+#include "util/logger.h"
namespace test_harness {
checkpoint_manager::checkpoint_manager(configuration *configuration)
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/checkpoint_manager.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/checkpoint_manager.h
index a570c8d215e..a127ee63657 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/checkpoint_manager.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/checkpoint_manager.h
@@ -29,9 +29,8 @@
#ifndef CHECKPOINT_MANAGER_H
#define CHECKPOINT_MANAGER_H
-#include "component.h"
-
-#include "src/storage/scoped_types.h"
+#include "core/component.h"
+#include "util/scoped_types.h"
namespace test_harness {
class checkpoint_manager : public component {
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/storage/connection_manager.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/connection_manager.cpp
index f5bf44637bb..292cfbbfeab 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/storage/connection_manager.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/connection_manager.cpp
@@ -27,12 +27,9 @@
*/
#include "connection_manager.h"
-
-#include "src/common/logger.h"
-
-extern "C" {
-#include "test_util.h"
-}
+#include "util/api_const.h"
+#include "util/logger.h"
+#include "util/scoped_connection.h"
namespace test_harness {
connection_manager &
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/storage/connection_manager.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/connection_manager.h
index 20161126736..2fef81d2af8 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/storage/connection_manager.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/connection_manager.h
@@ -39,7 +39,12 @@
#include <mutex>
-#include "scoped_types.h"
+extern "C" {
+#include "test_util.h"
+#include "wiredtiger.h"
+}
+
+#include "util/scoped_types.h"
namespace test_harness {
/*
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/component.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/component.cpp
index f2966db8d22..aeb691fe674 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/component.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/component.cpp
@@ -27,9 +27,7 @@
*/
#include "component.h"
-
-#include "src/common/api_const.h"
-#include "src/common/logger.h"
+#include "test_harness/util/api_const.h"
namespace test_harness {
component::component(const std::string &name, configuration *config) : _config(config), _name(name)
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/component.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/component.h
index effbd259310..5a8f8f81cf5 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/component.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/component.h
@@ -29,15 +29,15 @@
#ifndef COMPONENT_H
#define COMPONENT_H
-#include <string>
-
-#include "src/main/configuration.h"
-#include "src/main/throttle.h"
+#include "configuration.h"
+#include "throttle.h"
namespace test_harness {
/*
* A component is a class that defines 4 unique stages in its life-cycle, the stages must be run in
* the following order: load, run, end_run, finish.
+ *
+ *
*/
class component {
public:
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/main/configuration.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/configuration.cpp
index 3e00cb7450b..f508dc76bea 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/main/configuration.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/configuration.cpp
@@ -26,16 +26,10 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "configuration.h"
-
#include <algorithm>
#include <stack>
-#include "src/common/logger.h"
-
-extern "C" {
-#include "test_util.h"
-}
+#include "configuration.h"
namespace test_harness {
/* Static methods implementation. */
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/main/configuration.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/configuration.h
index e30291f199b..b61defc9d3f 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/main/configuration.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/configuration.h
@@ -32,8 +32,10 @@
#include <string>
#include <vector>
+#include "test_harness/util/logger.h"
+
extern "C" {
-#include "wiredtiger.h"
+#include "test_util.h"
}
namespace test_harness {
diff --git a/src/third_party/wiredtiger/test/cppsuite/test_harness/core/op_tracker.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/op_tracker.cpp
new file mode 100644
index 00000000000..af806927768
--- /dev/null
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/op_tracker.cpp
@@ -0,0 +1,37 @@
+#include "test_harness/test.h"
+#include "test_harness/util/perf_plotter.h"
+#include "op_tracker.h"
+
+namespace test_harness {
+op_tracker::op_tracker(const std::string id, const std::string &test_name)
+ : _id(id), _test_name(test_name), _it_count(0), _total_time_taken(0)
+{
+}
+
+void
+op_tracker::append_stats()
+{
+ uint64_t avg = (uint64_t)_total_time_taken / _it_count;
+ std::string stat = "{\"name\":\"" + _id + "\",\"value\":" + std::to_string(avg) + "}";
+ perf_plotter::instance().add_stat(stat);
+}
+
+template <typename T>
+auto
+op_tracker::track(T lambda)
+{
+ auto _start_time = std::chrono::steady_clock::now();
+ int ret = lambda();
+ auto _end_time = std::chrono::steady_clock::now();
+ _total_time_taken += (_end_time - _start_time).count();
+ _it_count += 1;
+
+ return ret;
+}
+
+op_tracker::~op_tracker()
+{
+ if (_it_count != 0)
+ append_stats();
+}
+}; // namespace test_harness
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/op_tracker.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/op_tracker.h
index f9a3c3c5698..eea99b2414c 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/op_tracker.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/op_tracker.h
@@ -26,9 +26,8 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#ifndef OP_TRACKER_H
-#define OP_TRACKER_H
-
+#include <chrono>
+#include <fstream>
#include <string>
namespace test_harness {
@@ -57,5 +56,3 @@ class op_tracker {
uint64_t _total_time_taken;
};
} // namespace test_harness
-
-#endif
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/main/throttle.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/throttle.cpp
index 98263140d4d..af7b94e8f98 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/main/throttle.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/throttle.cpp
@@ -26,15 +26,11 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "throttle.h"
-
#include <thread>
-#include "src/common/api_const.h"
-
-extern "C" {
-#include "test_util.h"
-}
+#include "configuration.h"
+#include "test_harness/util/api_const.h"
+#include "throttle.h"
namespace test_harness {
throttle::throttle(const std::string &throttle_rate)
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/main/throttle.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/throttle.h
index 29dd622f872..24161ea956e 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/main/throttle.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/core/throttle.h
@@ -31,7 +31,8 @@
#include <string>
-#include "configuration.h"
+/* Forward declarations for classes to reduce compilation time and modules coupling. */
+class configuration;
namespace test_harness {
class throttle {
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/runtime_monitor.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/runtime_monitor.cpp
index 1dce6df6c16..7298175e858 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/runtime_monitor.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/runtime_monitor.cpp
@@ -26,18 +26,16 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "runtime_monitor.h"
-
#include <fstream>
-#include "src/common/api_const.h"
-#include "src/common/logger.h"
-#include "src/component/perf_plotter.h"
-#include "src/storage/connection_manager.h"
-
-extern "C" {
-#include "test_util.h"
-}
+#include "connection_manager.h"
+#include "core/component.h"
+#include "core/configuration.h"
+#include "core/throttle.h"
+#include "runtime_monitor.h"
+#include "util/api_const.h"
+#include "util/logger.h"
+#include "util/perf_plotter.h"
namespace test_harness {
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/runtime_monitor.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/runtime_monitor.h
index 383401aefeb..a02d9979801 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/runtime_monitor.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/runtime_monitor.h
@@ -29,11 +29,19 @@
#ifndef RUNTIME_MONITOR_H
#define RUNTIME_MONITOR_H
-#include <memory>
+#include <string>
+#include <vector>
-#include "src/main/configuration.h"
-#include "src/main/database_model.h"
-#include "src/storage/scoped_types.h"
+extern "C" {
+#include "test_util.h"
+#include "wiredtiger.h"
+}
+
+#include "util/scoped_types.h"
+#include "workload/database_model.h"
+
+/* Forward declarations for classes to reduce compilation time and modules coupling. */
+class configuration;
namespace test_harness {
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/main/test.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/test.cpp
index 288ca08e2c4..9f93415ac64 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/main/test.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/test.cpp
@@ -26,11 +26,19 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+/* Required to build using older versions of g++. */
+#include <cinttypes>
+#include <memory>
+#include <mutex>
+
+#include "connection_manager.h"
+#include "core/component.h"
+#include "core/configuration.h"
#include "test.h"
-
-#include "src/common/api_const.h"
-#include "src/common/logger.h"
-#include "src/component/perf_plotter.h"
+#include "thread_manager.h"
+#include "timestamp_manager.h"
+#include "util/api_const.h"
+#include "util/perf_plotter.h"
namespace test_harness {
test::test(const test_args &args) : _args(args)
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/main/test.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/test.h
index 513df520e74..5e851cf7d03 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/main/test.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/test.h
@@ -29,14 +29,20 @@
#ifndef TEST_H
#define TEST_H
+#include <memory>
#include <string>
+#include <vector>
-#include "database_operation.h"
-#include "src/component/checkpoint_manager.h"
-#include "src/component/runtime_monitor.h"
-#include "src/component/workload_generator.h"
-#include "src/storage/connection_manager.h"
-#include "src/storage/scoped_connection.h"
+extern "C" {
+#include "wiredtiger.h"
+}
+
+#include "checkpoint_manager.h"
+#include "connection_manager.h"
+#include "runtime_monitor.h"
+#include "util/scoped_connection.h"
+#include "workload/database_operation.h"
+#include "workload_generator.h"
namespace test_harness {
class test_args {
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/common/thread_manager.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/thread_manager.cpp
index e41516c196e..29d1e547151 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/common/thread_manager.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/thread_manager.cpp
@@ -26,10 +26,9 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#include "test_harness/util/logger.h"
#include "thread_manager.h"
-#include "logger.h"
-
namespace test_harness {
thread_manager::~thread_manager()
{
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/common/thread_manager.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/thread_manager.h
index 0fce6bfeb45..0fce6bfeb45 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/common/thread_manager.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/thread_manager.h
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/timestamp_manager.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/timestamp_manager.cpp
index 1b7f967d154..fce4b3ca789 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/timestamp_manager.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/timestamp_manager.cpp
@@ -26,14 +26,15 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "timestamp_manager.h"
-
+#include <chrono>
#include <sstream>
+#include <thread>
-#include "src/common/api_const.h"
-#include "src/common/logger.h"
-#include "src/common/random_generator.h"
-#include "src/storage/connection_manager.h"
+#include "connection_manager.h"
+#include "core/configuration.h"
+#include "timestamp_manager.h"
+#include "util/api_const.h"
+#include "workload/random_generator.h"
namespace test_harness {
const std::string
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/timestamp_manager.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/timestamp_manager.h
index 15c75a235b6..88cff40c30e 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/timestamp_manager.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/timestamp_manager.h
@@ -30,12 +30,12 @@
#define TIMESTAMP_MANAGER_H
#include <atomic>
+#include <string>
-#include "component.h"
+#include "core/component.h"
-extern "C" {
-#include "test_util.h"
-}
+/* Forward declarations for classes to reduce compilation time and modules coupling. */
+class configuration;
namespace test_harness {
/*
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/common/api_const.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/api_const.cpp
index db313b93ebc..db313b93ebc 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/common/api_const.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/api_const.cpp
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/common/api_const.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/api_const.h
index 8c0038fdee5..8c0038fdee5 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/common/api_const.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/api_const.h
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/common/logger.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/logger.cpp
index 4bb0e982a31..67b72eac172 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/common/logger.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/logger.cpp
@@ -26,15 +26,13 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "logger.h"
-
+#include <chrono>
#include <iostream>
+#include <mutex>
#include <sstream>
#include <thread>
-extern "C" {
-#include "test_util.h"
-}
+#include "logger.h"
/* Define helpful functions related to debugging. */
namespace test_harness {
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/common/logger.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/logger.h
index 3284d82ee00..3b30ede7bd4 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/common/logger.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/logger.h
@@ -26,8 +26,8 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#ifndef LOGGER_H
-#define LOGGER_H
+#ifndef DEBUG_UTILS_H
+#define DEBUG_UTILS_H
/* Following definitions are required in order to use printing format specifiers in C++. */
#ifndef __STDC_LIMIT_MACROS
@@ -37,7 +37,15 @@
#define __STDC_FORMAT_MACROS
#endif
+#include <chrono>
+#include <iostream>
#include <mutex>
+#include <sstream>
+#include <thread>
+
+extern "C" {
+#include "test_util.h"
+}
/* Define helpful functions related to debugging. */
namespace test_harness {
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/perf_plotter.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/perf_plotter.cpp
index 780dcb4fff9..d02c1ae61a9 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/perf_plotter.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/perf_plotter.cpp
@@ -25,7 +25,6 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
-
#include "perf_plotter.h"
namespace test_harness {
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/perf_plotter.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/perf_plotter.h
index 3710f0d1ddf..36cd9a5817e 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/perf_plotter.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/perf_plotter.h
@@ -25,15 +25,11 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
-
#ifndef PERF_PLOTTER_H
#define PERF_PLOTTER_H
-
#include <fstream>
#include <mutex>
-#include <string>
#include <vector>
-
namespace test_harness {
/*
* Singleton class owning the perf plot json, provides access to add statistics, and a central call
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_connection.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_connection.cpp
index ca879aa4da9..39a8fede916 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_connection.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_connection.cpp
@@ -25,11 +25,12 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <iostream>
+#include <utility>
+#include "../connection_manager.h"
#include "scoped_connection.h"
-#include "connection_manager.h"
-
namespace test_harness {
scoped_connection::scoped_connection(const std::string &db_conn_config, const std::string &home)
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_connection.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_connection.h
index 2d76b800235..6e999b6db54 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_connection.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_connection.h
@@ -37,12 +37,12 @@
#define __STDC_FORMAT_MACROS
#endif
-#include <string>
-
extern "C" {
#include "test_util.h"
}
+#include "../connection_manager.h"
+
namespace test_harness {
class scoped_connection {
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_types.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_types.cpp
index 4c97213abc8..b0b20ccc0f8 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_types.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_types.cpp
@@ -26,11 +26,10 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "scoped_types.h"
+#include <string>
+#include <utility>
-extern "C" {
-#include "test_util.h"
-}
+#include "scoped_types.h"
namespace test_harness {
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_types.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_types.h
index e6f33931319..c015c0c909b 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/storage/scoped_types.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/util/scoped_types.h
@@ -37,10 +37,8 @@
#define __STDC_FORMAT_MACROS
#endif
-#include <string>
-
extern "C" {
-#include "wiredtiger.h"
+#include "test_util.h"
}
namespace test_harness {
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/main/database_model.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_model.cpp
index 848eff3863d..1fbd40012ed 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/main/database_model.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_model.cpp
@@ -26,11 +26,15 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "database_model.h"
+#include <chrono>
+#include <tuple>
-#include "src/common/api_const.h"
-#include "src/common/random_generator.h"
-#include "src/storage/connection_manager.h"
+#include "../connection_manager.h"
+#include "../timestamp_manager.h"
+#include "../util/api_const.h"
+#include "database_model.h"
+#include "random_generator.h"
+#include "workload_tracking.h"
namespace test_harness {
/* collection class implementation */
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/main/database_model.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_model.h
index aa239b00c75..d907dbfbda1 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/main/database_model.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_model.h
@@ -29,11 +29,14 @@
#ifndef DATABASE_MODEL_H
#define DATABASE_MODEL_H
+#include <atomic>
#include <string>
#include <map>
-#include <mutex>
-#include "src/component/workload_tracking.h"
+#include "workload_tracking.h"
+
+/* Forward declarations for classes to reduce compilation time and modules coupling. */
+class timestamp_manager;
namespace test_harness {
/* Key/Value type. */
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/main/database_operation.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_operation.cpp
index 0a72b79a778..549a84b5387 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/main/database_operation.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_operation.cpp
@@ -26,14 +26,16 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "database_operation.h"
+#include <cmath>
+#include <map>
-#include "src/common/thread_manager.h"
-#include "src/common/api_const.h"
-#include "src/common/logger.h"
-#include "src/common/random_generator.h"
-#include "src/component/workload_validation.h"
-#include "src/storage/connection_manager.h"
+#include "../connection_manager.h"
+#include "../thread_manager.h"
+#include "../util/api_const.h"
+#include "database_operation.h"
+#include "random_generator.h"
+#include "workload_tracking.h"
+#include "workload_validation.h"
namespace test_harness {
/* Static methods. */
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/main/database_operation.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_operation.h
index 946a322f25a..946a322f25a 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/main/database_operation.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/database_operation.h
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/common/random_generator.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/random_generator.cpp
index f391db0d180..3973af7242c 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/common/random_generator.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/random_generator.cpp
@@ -27,7 +27,6 @@
*/
#include "random_generator.h"
-
#include <algorithm>
extern "C" {
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/common/random_generator.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/random_generator.h
index 967d5566ce1..967d5566ce1 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/common/random_generator.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/random_generator.h
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/main/thread_context.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/thread_context.cpp
index b48b985b91f..75f1c338f74 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/main/thread_context.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/thread_context.cpp
@@ -26,12 +26,14 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#include "../core/configuration.h"
+#include "../timestamp_manager.h"
+#include "../util/api_const.h"
+#include "../util/logger.h"
+#include "workload_tracking.h"
+#include "random_generator.h"
#include "thread_context.h"
-#include "src/common/api_const.h"
-#include "src/common/logger.h"
-#include "src/common/random_generator.h"
-
namespace test_harness {
const std::string
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/main/thread_context.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/thread_context.h
index c97038f11cf..e968db51ec9 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/main/thread_context.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/thread_context.h
@@ -31,11 +31,17 @@
#include <string>
-#include "database_model.h"
-#include "src/component/workload_tracking.h"
-#include "src/component/timestamp_manager.h"
-#include "src/main/configuration.h"
-#include "src/storage/scoped_types.h"
+extern "C" {
+#include "test_util.h"
+}
+
+#include "../core/throttle.h"
+#include "../workload/database_model.h"
+
+/* Forward declarations for classes to reduce compilation time and modules coupling. */
+class configuration;
+class timestamp_manager;
+class workload_tracking;
namespace test_harness {
enum thread_type { CUSTOM, INSERT, READ, REMOVE, UPDATE };
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/workload_tracking.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_tracking.cpp
index 668ce176291..9b459bd4ad8 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/workload_tracking.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_tracking.cpp
@@ -26,12 +26,12 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#include "../connection_manager.h"
+#include "../core/configuration.h"
+#include "../util/api_const.h"
+#include "../util/scoped_types.h"
#include "workload_tracking.h"
-#include "src/common/api_const.h"
-#include "src/common/logger.h"
-#include "src/storage/connection_manager.h"
-
namespace test_harness {
workload_tracking::workload_tracking(
configuration *_config, const bool use_compression, timestamp_manager &tsm)
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/workload_tracking.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_tracking.h
index 640cb294f0c..0599c0b5a55 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/workload_tracking.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_tracking.h
@@ -29,9 +29,9 @@
#ifndef WORKLOAD_TRACKING_H
#define WORKLOAD_TRACKING_H
-#include "component.h"
-#include "src/storage/scoped_types.h"
-#include "timestamp_manager.h"
+#include "../core/component.h"
+#include "../timestamp_manager.h"
+#include "../util/scoped_types.h"
/*
* Default schema for tracking operations on collections (key_format: Collection id / Key /
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/workload_validation.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_validation.cpp
index b10958be297..a64ef7e5b7b 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/workload_validation.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_validation.cpp
@@ -26,12 +26,11 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "workload_validation.h"
-
#include <algorithm>
-#include "src/common/logger.h"
-#include "src/storage/connection_manager.h"
+#include "../connection_manager.h"
+#include "database_model.h"
+#include "workload_validation.h"
namespace test_harness {
void
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/workload_validation.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_validation.h
index ecb8f660bc3..ba745a225df 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/workload_validation.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload/workload_validation.h
@@ -33,7 +33,11 @@
#include <string>
#include <vector>
-#include "src/main/database_model.h"
+extern "C" {
+#include "wiredtiger.h"
+}
+
+#include "../util/scoped_types.h"
namespace test_harness {
struct key_state {
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/workload_generator.cpp b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload_generator.cpp
index e643a576a55..026f05b2cb5 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/workload_generator.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload_generator.cpp
@@ -26,11 +26,18 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "workload_generator.h"
+#include <atomic>
+#include <map>
-#include "src/common/api_const.h"
-#include "src/common/logger.h"
-#include "src/storage/connection_manager.h"
+#include "connection_manager.h"
+#include "core/configuration.h"
+#include "core/throttle.h"
+#include "util/api_const.h"
+#include "workload/database_model.h"
+#include "workload/database_operation.h"
+#include "workload/random_generator.h"
+#include "workload/workload_tracking.h"
+#include "workload_generator.h"
namespace test_harness {
/* operation_config class implementation */
@@ -39,7 +46,7 @@ operation_config::operation_config(configuration *config, thread_type type)
{
}
-std::function<void(thread_context *)>
+std::function<void(test_harness::thread_context *)>
operation_config::get_func(database_operation *dbo)
{
switch (type) {
diff --git a/src/third_party/wiredtiger/test/cppsuite/src/component/workload_generator.h b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload_generator.h
index 53a33311bfc..11049e53063 100644
--- a/src/third_party/wiredtiger/test/cppsuite/src/component/workload_generator.h
+++ b/src/third_party/wiredtiger/test/cppsuite/test_harness/workload_generator.h
@@ -29,12 +29,18 @@
#ifndef WORKLOAD_GENERATOR_H
#define WORKLOAD_GENERATOR_H
+#include <algorithm>
#include <functional>
-#include "src/common/thread_manager.h"
-#include "src/main/configuration.h"
-#include "src/main/database_operation.h"
-#include "src/main/thread_context.h"
+#include "core/component.h"
+#include "workload/thread_context.h"
+#include "thread_manager.h"
+#include "workload/database_operation.h"
+
+/* Forward declarations for classes to reduce compilation time and modules coupling. */
+class configuration;
+class database;
+class workload_tracking;
namespace test_harness {
/*
@@ -45,7 +51,7 @@ class operation_config {
explicit operation_config(configuration *config, thread_type type);
/* Returns a function pointer to the member function of the supplied database operation. */
- std::function<void(thread_context *)> get_func(database_operation *dbo);
+ std::function<void(test_harness::thread_context *)> get_func(database_operation *dbo);
public:
configuration *config;
diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/bounded_cursor_perf.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/bounded_cursor_perf.cpp
index f850edf897b..7f4dfea30b0 100644
--- a/src/third_party/wiredtiger/test/cppsuite/tests/bounded_cursor_perf.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/tests/bounded_cursor_perf.cpp
@@ -26,10 +26,14 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "src/component/op_tracker.cpp"
-#include "src/main/test.h"
+#include <time.h>
-using namespace test_harness;
+#include "test_harness/core/op_tracker.cpp"
+#include "test_harness/test.h"
+#include "test_harness/util/api_const.h"
+#include "test_harness/workload/random_generator.h"
+
+namespace test_harness {
/*
* This test performs cursor traversal operations next() and prev() on a collection with both
@@ -110,3 +114,4 @@ class bounded_cursor_perf : public test {
}
}
};
+} // namespace test_harness
diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/burst_inserts.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/burst_inserts.cpp
index 64ae392d14b..97341e356b3 100644
--- a/src/third_party/wiredtiger/test/cppsuite/tests/burst_inserts.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/tests/burst_inserts.cpp
@@ -26,8 +26,9 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "src/common/random_generator.h"
-#include "src/main/test.h"
+#include "test_harness/test.h"
+#include "test_harness/workload/random_generator.h"
+#include "test_harness/timestamp_manager.h"
using namespace test_harness;
diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/cache_resize.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/cache_resize.cpp
index 98b357b7eb8..ccffed30420 100644
--- a/src/third_party/wiredtiger/test/cppsuite/tests/cache_resize.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/tests/cache_resize.cpp
@@ -26,15 +26,11 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "src/common/api_const.h"
-#include "src/common/random_generator.h"
-#include "src/component/workload_tracking.h"
-#include "src/main/test.h"
-
-using namespace test_harness;
+#include "test_harness/test.h"
+namespace test_harness {
/* Defines what data is written to the tracking table for use in custom validation. */
-class tracking_table_cache_resize : public workload_tracking {
+class tracking_table_cache_resize : public test_harness::workload_tracking {
public:
tracking_table_cache_resize(
@@ -59,16 +55,16 @@ class tracking_table_cache_resize : public workload_tracking {
* than the cache size they are rejected, so only transactions made when cache size is 500MB should
* be allowed.
*/
-class cache_resize : public test {
+class cache_resize : public test_harness::test {
public:
- cache_resize(const test_args &args) : test(args)
+ cache_resize(const test_harness::test_args &args) : test(args)
{
init_tracking(new tracking_table_cache_resize(_config->get_subconfig(WORKLOAD_TRACKING),
_config->get_bool(COMPRESSION_ENABLED), *_timestamp_manager));
}
void
- custom_operation(thread_context *tc) override final
+ custom_operation(test_harness::thread_context *tc) override final
{
WT_CONNECTION *conn = connection_manager::instance().get_connection();
WT_CONNECTION_IMPL *conn_impl = (WT_CONNECTION_IMPL *)conn;
@@ -124,7 +120,7 @@ class cache_resize : public test {
}
void
- insert_operation(thread_context *tc) override final
+ insert_operation(test_harness::thread_context *tc) override final
{
const uint64_t collection_count = tc->db.get_collection_count();
testutil_assert(collection_count > 0);
@@ -237,3 +233,5 @@ class cache_resize : public test {
*/
}
};
+
+} // namespace test_harness
diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/csuite_style_example_test.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/csuite_style_example_test.cpp
index 155ffc101e9..0b5a2966b2f 100644
--- a/src/third_party/wiredtiger/test/cppsuite/tests/csuite_style_example_test.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/tests/csuite_style_example_test.cpp
@@ -33,16 +33,15 @@
* test_template.cpp and create_script.sh.
*/
-#include "src/common/api_const.h"
-#include "src/common/logger.h"
-#include "src/common/random_generator.h"
-#include "src/common/thread_manager.h"
-#include "src/storage/connection_manager.h"
-#include "src/storage/scoped_connection.h"
+#include "test_harness/connection_manager.h"
+#include "test_harness/thread_manager.h"
+#include "test_harness/util/api_const.h"
+#include "test_harness/util/logger.h"
+#include "test_harness/util/scoped_connection.h"
+#include "test_harness/workload/random_generator.h"
extern "C" {
#include "wiredtiger.h"
-#include "test_util.h"
}
using namespace test_harness;
diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/cursor_bound_01.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/cursor_bound_01.cpp
index 1cbbad51333..f3f733dfe25 100644
--- a/src/third_party/wiredtiger/test/cppsuite/tests/cursor_bound_01.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/tests/cursor_bound_01.cpp
@@ -26,11 +26,9 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "src/common/api_const.h"
-#include "src/common/random_generator.h"
-#include "src/main/test.h"
-
-using namespace test_harness;
+#include "test_harness/test.h"
+#include "test_harness/util/api_const.h"
+#include "test_harness/workload/random_generator.h"
/*
* In this test, we want to verify the usage of the cursor bound API and check that the cursor
@@ -45,6 +43,8 @@ using namespace test_harness;
* random bounds set. Both next() and prev() calls with bounds set is verified against the
* default cursor next() and prev() calls.
*/
+namespace test_harness {
+
class cursor_bound_01 : public test {
/* Class helper to represent the lower and uppers bounds for the range cursor. */
class bound {
@@ -699,3 +699,5 @@ class cursor_bound_01 : public test {
tc->transaction.rollback();
}
};
+
+} // namespace test_harness
diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/hs_cleanup.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/hs_cleanup.cpp
index a92b53066fb..475153ae9c7 100644
--- a/src/third_party/wiredtiger/test/cppsuite/tests/hs_cleanup.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/tests/hs_cleanup.cpp
@@ -26,8 +26,9 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "src/common/random_generator.h"
-#include "src/main/test.h"
+#include "test_harness/test.h"
+
+#include "test_harness/connection_manager.h"
using namespace test_harness;
diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/operations_test.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/operations_test.cpp
index 7be490958ff..b96ba0ebd86 100644
--- a/src/third_party/wiredtiger/test/cppsuite/tests/operations_test.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/tests/operations_test.cpp
@@ -26,9 +26,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "src/main/test.h"
-
-using namespace test_harness;
+#include "test_harness/test.h"
/*
* The "base test" that the framework uses, because its not overloading any of the database
@@ -36,9 +34,9 @@ using namespace test_harness;
*
* Can be used to create stress tests in various ways.
*/
-class operations_test : public test {
+class operations_test : public test_harness::test {
public:
- operations_test(const test_args &args) : test(args)
+ operations_test(const test_harness::test_args &args) : test(args)
{
init_tracking();
}
diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/run.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/run.cpp
index c79c0cb4220..6d52caee4fb 100755
--- a/src/third_party/wiredtiger/test/cppsuite/tests/run.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/tests/run.cpp
@@ -26,12 +26,12 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <algorithm>
+#include <fstream>
#include <iostream>
#include <string>
-#include "src/common/logger.h"
-#include "src/main/test.h"
+#include "test_harness/util/logger.h"
+#include "test_harness/test.h"
#include "bounded_cursor_perf.cpp"
#include "burst_inserts.cpp"
@@ -44,10 +44,6 @@
#include "search_near_03.cpp"
#include "test_template.cpp"
-extern "C" {
-#include "test_util.h"
-}
-
/* Declarations to avoid the error raised by -Werror=missing-prototypes. */
const std::string parse_configuration_from_file(const std::string &filename);
void print_help();
diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/search_near_01.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/search_near_01.cpp
index b70c5573f74..dcb6692f643 100644
--- a/src/third_party/wiredtiger/test/cppsuite/tests/search_near_01.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/tests/search_near_01.cpp
@@ -26,12 +26,13 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "src/common/api_const.h"
-#include "src/common/random_generator.h"
-#include "src/main/test.h"
+#include "test_harness/util/api_const.h"
+#include "test_harness/workload/random_generator.h"
+#include "test_harness/workload/thread_context.h"
+#include "test_harness/test.h"
+#include "test_harness/thread_manager.h"
using namespace test_harness;
-
/*
* In this test, we want to verify that search_near with prefix enabled only traverses the portion
* of the tree that follows the prefix portion of the search key. The test is composed of a populate
@@ -42,7 +43,7 @@ using namespace test_harness;
* - Using WiredTiger statistics to validate that the number of entries traversed is within
* bounds of the search key.
*/
-class search_near_01 : public test {
+class search_near_01 : public test_harness::test {
uint64_t keys_per_prefix = 0;
uint64_t srchkey_len = 0;
const std::string ALPHABET{"abcdefghijklmnopqrstuvwxyz"};
@@ -101,14 +102,14 @@ class search_near_01 : public test {
}
public:
- search_near_01(const test_args &args) : test(args)
+ search_near_01(const test_harness::test_args &args) : test(args)
{
init_tracking();
}
void
- populate(database &database, timestamp_manager *tsm, configuration *config,
- workload_tracking *tracking) override final
+ populate(test_harness::database &database, test_harness::timestamp_manager *tsm,
+ test_harness::configuration *config, test_harness::workload_tracking *tracking) override final
{
uint64_t collection_count, key_size;
std::vector<thread_context *> workers;
@@ -179,8 +180,8 @@ class search_near_01 : public test {
}
static void
- perform_search_near(thread_context *tc, std::string collection_name, uint64_t srchkey_len,
- std::atomic<int64_t> &z_key_searches)
+ perform_search_near(test_harness::thread_context *tc, std::string collection_name,
+ uint64_t srchkey_len, std::atomic<int64_t> &z_key_searches)
{
std::string srch_key;
int cmpp = 0;
@@ -222,13 +223,13 @@ class search_near_01 : public test {
}
void
- read_operation(thread_context *tc) override final
+ read_operation(test_harness::thread_context *tc) override final
{
/* Make sure that thread statistics cursor is null before we open it. */
testutil_assert(tc->stat_cursor.get() == nullptr);
/* This test will only work with one read thread. */
testutil_assert(tc->thread_count == 1);
- configuration *workload_config, *read_config;
+ test_harness::configuration *workload_config, *read_config;
std::vector<thread_context *> workers;
std::atomic<int64_t> z_key_searches;
int64_t entries_stat, expected_entries, prefix_stat, prev_entries_stat, prev_prefix_stat;
diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/search_near_02.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/search_near_02.cpp
index da93537bf84..63d0354c9c8 100644
--- a/src/third_party/wiredtiger/test/cppsuite/tests/search_near_02.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/tests/search_near_02.cpp
@@ -26,9 +26,9 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "src/common/api_const.h"
-#include "src/common/random_generator.h"
-#include "src/main/test.h"
+#include "test_harness/test.h"
+#include "test_harness/util/api_const.h"
+#include "test_harness/workload/random_generator.h"
using namespace test_harness;
@@ -39,16 +39,16 @@ using namespace test_harness;
* - M threads will execute search_near calls with prefix enabled using random prefixes as well.
* Each search_near call with prefix enabled is verified using the default search_near.
*/
-class search_near_02 : public test {
+class search_near_02 : public test_harness::test {
public:
- search_near_02(const test_args &args) : test(args)
+ search_near_02(const test_harness::test_args &args) : test(args)
{
init_tracking();
}
void
- populate(database &database, timestamp_manager *, configuration *config,
- workload_tracking *) override final
+ populate(test_harness::database &database, test_harness::timestamp_manager *,
+ test_harness::configuration *config, test_harness::workload_tracking *) override final
{
/*
* The populate phase only creates empty collections. The number of collections is defined
@@ -66,7 +66,7 @@ class search_near_02 : public test {
}
void
- insert_operation(thread_context *tc) override final
+ insert_operation(test_harness::thread_context *tc) override final
{
/* Each insert operation will insert new keys in the collections. */
logger::log_msg(
@@ -145,7 +145,7 @@ class search_near_02 : public test {
}
void
- read_operation(thread_context *tc) override final
+ read_operation(test_harness::thread_context *tc) override final
{
/*
* Each read operation performs search_near calls with and without prefix enabled on random
diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/search_near_03.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/search_near_03.cpp
index b4b365a9792..dc6b4a0352a 100644
--- a/src/third_party/wiredtiger/test/cppsuite/tests/search_near_03.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/tests/search_near_03.cpp
@@ -26,9 +26,9 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "src/common/api_const.h"
-#include "src/common/random_generator.h"
-#include "src/main/test.h"
+#include "test_harness/test.h"
+#include "test_harness/util/api_const.h"
+#include "test_harness/workload/random_generator.h"
using namespace test_harness;
@@ -40,13 +40,13 @@ using namespace test_harness;
* - M threads will traverse the collections and ensure that the number of records in the
* collections don't change.
*/
-class search_near_03 : public test {
+class search_near_03 : public test_harness::test {
/* A 2D array consisted of a mapping between each collection and their inserted prefixes. */
std::vector<std::vector<std::string>> prefixes_map;
const std::string ALPHABET{"abcdefghijklmnopqrstuvwxyz"};
public:
- search_near_03(const test_args &args) : test(args)
+ search_near_03(const test_harness::test_args &args) : test(args)
{
init_tracking();
}
@@ -143,8 +143,8 @@ class search_near_03 : public test {
}
void
- populate(database &database, timestamp_manager *tsm, configuration *config,
- workload_tracking *tracking) override final
+ populate(test_harness::database &database, test_harness::timestamp_manager *tsm,
+ test_harness::configuration *config, test_harness::workload_tracking *tracking) override final
{
uint64_t collection_count, key_count, key_size;
std::vector<thread_context *> workers;
@@ -217,7 +217,7 @@ class search_near_03 : public test {
}
void
- insert_operation(thread_context *tc) override final
+ insert_operation(test_harness::thread_context *tc) override final
{
std::map<uint64_t, scoped_cursor> cursors;
std::string prefix_key;
@@ -261,7 +261,7 @@ class search_near_03 : public test {
}
void
- read_operation(thread_context *tc) override final
+ read_operation(test_harness::thread_context *tc) override final
{
uint64_t key_count = 0;
int ret = 0;
diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/test_template.cpp b/src/third_party/wiredtiger/test/cppsuite/tests/test_template.cpp
index 5ddf4826597..96e9ff29fdc 100644
--- a/src/third_party/wiredtiger/test/cppsuite/tests/test_template.cpp
+++ b/src/third_party/wiredtiger/test/cppsuite/tests/test_template.cpp
@@ -26,14 +26,11 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <iostream>
-
-#include "src/common/api_const.h"
-#include "src/main/test.h"
+#include "test_harness/test.h"
namespace test_harness {
/* Defines what data is written to the tracking table for use in custom validation. */
-class tracking_table_template : public workload_tracking {
+class tracking_table_template : public test_harness::workload_tracking {
public:
tracking_table_template(
@@ -57,9 +54,9 @@ class tracking_table_template : public workload_tracking {
* Class that defines operations that do nothing as an example. This shows how database operations
* can be overridden and customized.
*/
-class test_template : public test {
+class test_template : public test_harness::test {
public:
- test_template(const test_args &args) : test(args)
+ test_template(const test_harness::test_args &args) : test(args)
{
init_tracking(new tracking_table_template(_config->get_subconfig(WORKLOAD_TRACKING),
_config->get_bool(COMPRESSION_ENABLED), *_timestamp_manager));
@@ -73,37 +70,38 @@ class test_template : public test {
}
void
- populate(database &, timestamp_manager *, configuration *, workload_tracking *) override final
+ populate(test_harness::database &, test_harness::timestamp_manager *,
+ test_harness::configuration *, test_harness::workload_tracking *) override final
{
std::cout << "populate: nothing done." << std::endl;
}
void
- custom_operation(thread_context *) override final
+ custom_operation(test_harness::thread_context *) override final
{
std::cout << "custom_operation: nothing done." << std::endl;
}
void
- insert_operation(thread_context *) override final
+ insert_operation(test_harness::thread_context *) override final
{
std::cout << "insert_operation: nothing done." << std::endl;
}
void
- read_operation(thread_context *) override final
+ read_operation(test_harness::thread_context *) override final
{
std::cout << "read_operation: nothing done." << std::endl;
}
void
- remove_operation(thread_context *) override final
+ remove_operation(test_harness::thread_context *) override final
{
std::cout << "remove_operation: nothing done." << std::endl;
}
void
- update_operation(thread_context *) override final
+ update_operation(test_harness::thread_context *) override final
{
std::cout << "update_operation: nothing done." << std::endl;
}