From 530f0567e17287aa59ebc212cae232212c097156 Mon Sep 17 00:00:00 2001 From: Vasil Pashov Date: Tue, 16 Apr 2024 16:04:14 +0300 Subject: [PATCH] Fix windows compilation errors --- cpp/arcticdb/CMakeLists.txt | 4 +-- cpp/arcticdb/codec/segment.hpp | 2 +- .../test/ingestion_stress_test.cpp | 1 + cpp/arcticdb/entity/field_collection.hpp | 6 ++--- cpp/arcticdb/pipeline/frame_utils.hpp | 2 +- cpp/arcticdb/storage/storage.hpp | 1 - .../stream/test/stream_test_common.cpp | 4 +-- .../stream/test/stream_test_common.hpp | 16 ------------ .../stream/test/test_store_common.hpp | 26 +++++++++++++++++++ cpp/arcticdb/util/buffer.hpp | 4 +-- cpp/arcticdb/util/buffer_holder.hpp | 2 +- cpp/arcticdb/util/memory_tracing.hpp | 2 +- cpp/arcticdb/version/test/test_merge.cpp | 2 ++ cpp/arcticdb/version/test/test_sparse.cpp | 2 ++ .../version/test/test_version_map.cpp | 2 ++ .../version/test/test_version_map_batch.cpp | 2 ++ .../version/test/test_version_store.cpp | 2 ++ 17 files changed, 50 insertions(+), 30 deletions(-) create mode 100644 cpp/arcticdb/stream/test/test_store_common.hpp diff --git a/cpp/arcticdb/CMakeLists.txt b/cpp/arcticdb/CMakeLists.txt index 222581452f..b3b9db30ce 100644 --- a/cpp/arcticdb/CMakeLists.txt +++ b/cpp/arcticdb/CMakeLists.txt @@ -792,7 +792,9 @@ if(${TEST}) storage/test/test_storage_factory.cpp storage/test/test_storage_exceptions.cpp storage/test/test_azure_storage.cpp + stream/test/stream_test_common.hpp stream/test/stream_test_common.cpp + stream/test/test_store_common.hpp stream/test/test_aggregator.cpp stream/test/test_append_map.cpp stream/test/test_row_builder.cpp @@ -915,9 +917,7 @@ if(${TEST}) PUBLIC benchmark::benchmark benchmark::benchmark_main - ${COMMON_PUBLIC_TEST_LIBRARIES} PRIVATE - ${AWSSDK_LINK_LIBRARIES} arcticdb_core_static ) diff --git a/cpp/arcticdb/codec/segment.hpp b/cpp/arcticdb/codec/segment.hpp index 071b57d167..3d9fc8638d 100644 --- a/cpp/arcticdb/codec/segment.hpp +++ b/cpp/arcticdb/codec/segment.hpp @@ -7,7 +7,7 @@ #pragma once -#include "util/buffer.hpp" +#include #include #include #include diff --git a/cpp/arcticdb/column_store/test/ingestion_stress_test.cpp b/cpp/arcticdb/column_store/test/ingestion_stress_test.cpp index 77056bcf8c..b50bda6c4e 100644 --- a/cpp/arcticdb/column_store/test/ingestion_stress_test.cpp +++ b/cpp/arcticdb/column_store/test/ingestion_stress_test.cpp @@ -14,6 +14,7 @@ #include #include #include +#include using namespace arcticdb; namespace as = arcticdb::stream; diff --git a/cpp/arcticdb/entity/field_collection.hpp b/cpp/arcticdb/entity/field_collection.hpp index 891e5a975d..e0b10f5f56 100644 --- a/cpp/arcticdb/entity/field_collection.hpp +++ b/cpp/arcticdb/entity/field_collection.hpp @@ -8,9 +8,9 @@ #pragma once #include -#include -#include -#include +#include +#include +#include #include namespace arcticdb { diff --git a/cpp/arcticdb/pipeline/frame_utils.hpp b/cpp/arcticdb/pipeline/frame_utils.hpp index d1db6cf1d9..8cb6376c07 100644 --- a/cpp/arcticdb/pipeline/frame_utils.hpp +++ b/cpp/arcticdb/pipeline/frame_utils.hpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include diff --git a/cpp/arcticdb/storage/storage.hpp b/cpp/arcticdb/storage/storage.hpp index c0da8795c0..8804f8ca98 100644 --- a/cpp/arcticdb/storage/storage.hpp +++ b/cpp/arcticdb/storage/storage.hpp @@ -9,7 +9,6 @@ #include #include #include -#include namespace arcticdb::storage { diff --git a/cpp/arcticdb/stream/test/stream_test_common.cpp b/cpp/arcticdb/stream/test/stream_test_common.cpp index 2843c487f0..57e38155ea 100644 --- a/cpp/arcticdb/stream/test/stream_test_common.cpp +++ b/cpp/arcticdb/stream/test/stream_test_common.cpp @@ -5,10 +5,10 @@ * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. */ -#include +#include #include namespace arcticdb { -std::atomic PilotedClock::time_{0}; +std::atomic PilotedClock::time_{0}; } //namespace arcticdb \ No newline at end of file diff --git a/cpp/arcticdb/stream/test/stream_test_common.hpp b/cpp/arcticdb/stream/test/stream_test_common.hpp index e27e920398..5bd5239b46 100644 --- a/cpp/arcticdb/stream/test/stream_test_common.hpp +++ b/cpp/arcticdb/stream/test/stream_test_common.hpp @@ -15,7 +15,6 @@ #include #include #include -#include #include namespace fg = folly::gen; @@ -336,19 +335,4 @@ inline auto test_store(const std::string &lib_name) { return version_store; } -struct TestStore : ::testing::Test { -protected: - virtual std::string get_name() = 0; - - void SetUp() override { - test_store_ = test_store(get_name()); - } - - void TearDown() override { - test_store_->clear(); - } - - std::shared_ptr test_store_; -}; - } //namespace arcticdb diff --git a/cpp/arcticdb/stream/test/test_store_common.hpp b/cpp/arcticdb/stream/test/test_store_common.hpp new file mode 100644 index 0000000000..b54b0a0090 --- /dev/null +++ b/cpp/arcticdb/stream/test/test_store_common.hpp @@ -0,0 +1,26 @@ +/* Copyright 2024 Man Group Operations Limited + * + * Use of this software is governed by the Business Source License 1.1 included in the file licenses/BSL.txt. + * + * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software + * will be governed by the Apache License, version 2.0. + */ +#include +#include + +namespace arcticdb { + struct TestStore : ::testing::Test { + protected: + virtual std::string get_name() = 0; + + void SetUp() override { + test_store_ = test_store(get_name()); + } + + void TearDown() override { + test_store_->clear(); + } + + std::shared_ptr test_store_; + }; +} diff --git a/cpp/arcticdb/util/buffer.hpp b/cpp/arcticdb/util/buffer.hpp index 905856c22c..22cf8a9181 100644 --- a/cpp/arcticdb/util/buffer.hpp +++ b/cpp/arcticdb/util/buffer.hpp @@ -7,8 +7,8 @@ #pragma once -#include -#include +#include +#include #include #include diff --git a/cpp/arcticdb/util/buffer_holder.hpp b/cpp/arcticdb/util/buffer_holder.hpp index 603500eeea..4684bbcf4e 100644 --- a/cpp/arcticdb/util/buffer_holder.hpp +++ b/cpp/arcticdb/util/buffer_holder.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include #include namespace arcticdb { diff --git a/cpp/arcticdb/util/memory_tracing.hpp b/cpp/arcticdb/util/memory_tracing.hpp index ac4431fbd5..01e2f37169 100644 --- a/cpp/arcticdb/util/memory_tracing.hpp +++ b/cpp/arcticdb/util/memory_tracing.hpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #ifdef WIN32 #include #else diff --git a/cpp/arcticdb/version/test/test_merge.cpp b/cpp/arcticdb/version/test/test_merge.cpp index e2be9abe93..fff9c662e0 100644 --- a/cpp/arcticdb/version/test/test_merge.cpp +++ b/cpp/arcticdb/version/test/test_merge.cpp @@ -12,6 +12,8 @@ #include #include #include +#include + struct MergeReadsTestStore : arcticdb::TestStore { protected: diff --git a/cpp/arcticdb/version/test/test_sparse.cpp b/cpp/arcticdb/version/test/test_sparse.cpp index 8789267713..0f8c7c83e6 100644 --- a/cpp/arcticdb/version/test/test_sparse.cpp +++ b/cpp/arcticdb/version/test/test_sparse.cpp @@ -14,6 +14,8 @@ #include #include #include +#include + struct SparseTestStore : arcticdb::TestStore { protected: diff --git a/cpp/arcticdb/version/test/test_version_map.cpp b/cpp/arcticdb/version/test/test_version_map.cpp index 974d8cd6b3..d44c9709c5 100644 --- a/cpp/arcticdb/version/test/test_version_map.cpp +++ b/cpp/arcticdb/version/test/test_version_map.cpp @@ -12,6 +12,8 @@ #include #include #include +#include + namespace arcticdb { diff --git a/cpp/arcticdb/version/test/test_version_map_batch.cpp b/cpp/arcticdb/version/test/test_version_map_batch.cpp index 16aa0f7ba3..80ed0799c4 100644 --- a/cpp/arcticdb/version/test/test_version_map_batch.cpp +++ b/cpp/arcticdb/version/test/test_version_map_batch.cpp @@ -4,6 +4,8 @@ #include #include #include +#include + using namespace arcticdb; using namespace arcticdb::pipelines; diff --git a/cpp/arcticdb/version/test/test_version_store.cpp b/cpp/arcticdb/version/test/test_version_store.cpp index 22ab47a3bd..aba051eb1b 100644 --- a/cpp/arcticdb/version/test/test_version_store.cpp +++ b/cpp/arcticdb/version/test/test_version_store.cpp @@ -15,6 +15,8 @@ #include #include #include +#include + #include #include