diff --git a/src/caosdb/file_transmission/download_request_handler.cpp b/src/caosdb/file_transmission/download_request_handler.cpp index fb36ca5b46cbf2c4f08c2c06bc9faf6b00e038be..db4769b3a05d1a7696860ae4a920d4a461cc2fa2 100644 --- a/src/caosdb/file_transmission/download_request_handler.cpp +++ b/src/caosdb/file_transmission/download_request_handler.cpp @@ -59,16 +59,17 @@ #include <boost/preprocessor/seq/limits/size_256.hpp> // for BOOST_PP_SEQ_... #include <exception> // IWYU pragma: keep // IWYU pragma: no_include <bits/exception.h> -#include <google/protobuf/arena.h> // for Arena -#include <grpcpp/impl/codegen/async_stream.h> // for ClientAsyncRe... -#include <grpcpp/impl/codegen/client_context.h> // for ClientContext -#include <grpcpp/impl/codegen/completion_queue.h> // for CompletionQueue -#include <grpcpp/impl/codegen/status.h> // for Status -#include <grpcpp/impl/codegen/status_code_enum.h> // for OK, UNAUTHENT... -#include <iostream> // for char_traits -#include <stdexcept> // for runtime_error -#include <string> // for string, opera... -#include <utility> // for move +#include <google/protobuf/arena.h> // for Arena +#include <google/protobuf/generated_message_util.h> // for Arena +#include <grpcpp/impl/codegen/async_stream.h> // for ClientAsyncRe... +#include <grpcpp/impl/codegen/client_context.h> // for ClientContext +#include <grpcpp/impl/codegen/completion_queue.h> // for CompletionQueue +#include <grpcpp/impl/codegen/status.h> // for Status +#include <grpcpp/impl/codegen/status_code_enum.h> // for OK, UNAUTHENT... +#include <iostream> // for char_traits +#include <stdexcept> // for runtime_error +#include <string> // for string, opera... +#include <utility> // for move namespace caosdb::transaction { using caosdb::StatusCode; diff --git a/src/caosdb/transaction.cpp b/src/caosdb/transaction.cpp index 77321362b59eb23dab749b6685aa48173de2d63c..ac64e26609b99e3047fc16f36825aec03ab038af 100644 --- a/src/caosdb/transaction.cpp +++ b/src/caosdb/transaction.cpp @@ -22,15 +22,14 @@ #include "caosdb/entity/v1alpha1/main.pb.h" // for TransactionRe... #include "caosdb/file_transmission/download_request_handler.h" // Download... #include "caosdb/file_transmission/file_reader.h" // for path -#include "caosdb/file_transmission/register_file_upload_handler.h" +#include "caosdb/file_transmission/register_file_upload_handler.h" // for RegisterFileUploadHandler #include "caosdb/file_transmission/upload_request_handler.h" // Upload... -#include "caosdb/logging.h" // for CAOSDB_LOG_FATAL -#include "caosdb/protobuf_helper.h" -#include "caosdb/status_code.h" // for StatusCode -#include "caosdb/transaction_handler.h" -#include <algorithm> // for max -#include <boost/filesystem/path.hpp> // for operator<<, path -#include <boost/log/core/record.hpp> // for record +#include "caosdb/logging.h" // for CAOSDB_LOG_FATAL +#include "caosdb/status_code.h" // for StatusCode +#include "caosdb/transaction_handler.h" // for EntityTransactionHandler +#include <algorithm> // for max +#include <boost/filesystem/path.hpp> // for operator<<, path +#include <boost/log/core/record.hpp> // for record #include <boost/log/detail/attachable_sstream_buf.hpp> // for basic_ostring... #include <boost/log/sources/record_ostream.hpp> // for basic_record_... #include <boost/preprocessor/seq/limits/enum_256.hpp> // for BOOST_PP_SEQ_... @@ -39,14 +38,13 @@ #include <exception> // IWYU pragma: keep #include <google/protobuf/arena.h> // for Arena #include <google/protobuf/generated_message_util.h> // for CreateMessage... -#include <google/protobuf/util/json_util.h> -#include <grpc/impl/codegen/gpr_types.h> -#include <grpcpp/impl/codegen/completion_queue.h> // for CompletionQueue -#include <iosfwd> // for streamsize -#include <map> // for map, operator!= -#include <memory> // for unique_ptr -#include <stdexcept> // for out_of_range -#include <utility> // for move, pair +#include <grpc/impl/codegen/gpr_types.h> // for gpr_timespec +#include <grpcpp/impl/codegen/completion_queue.h> // for CompletionQueue +#include <iosfwd> // for streamsize +#include <map> // for map, operator!= +#include <memory> // for unique_ptr +#include <stdexcept> // for out_of_range +#include <utility> // for move, pair namespace caosdb { @@ -232,8 +230,6 @@ auto Transaction::InsertEntity(Entity *entity) noexcept -> StatusCode { // copy the original entity for the transaction entity->CopyTo(proto_entity); - CAOSDB_DEBUG_MESSAGE_STRING(*proto_entity, out); - CAOSDB_LOG_DEBUG(logger_name) << "INSERT ENTITY: " << out; if (entity->HasFile()) { auto *file_transmission_id = entity_request->mutable_upload_id(); entity->SetFileTransmissionId(file_transmission_id); diff --git a/test/test_data_type.cpp b/test/test_data_type.cpp index b57c4b26946e7754c1b9f19aea0b6592e447381c..9ab4ac01d7761c77460697a7b264fa7d7b9a8401 100644 --- a/test/test_data_type.cpp +++ b/test/test_data_type.cpp @@ -23,10 +23,18 @@ #include "caosdb/data_type.h" // for DataType, AtomicDataType #include "caosdb/entity.h" // for Entity #include "caosdb/entity/v1alpha1/main.pb.h" // for AtomicDataType, DataType -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApi... -#include <gtest/gtest_pred_impl.h> // for AssertionResult, Test -#include <memory> // for allocator +#include "caosdb/logging.h" // for CAOSDB_LOG_DEBUG +#include "caosdb/protobuf_helper.h" // for CAOSDB_DEBUG_... +#include <boost/log/core/record.hpp> // for record +#include <boost/log/detail/attachable_sstream_buf.hpp> // for basic_ostring... +#include <boost/log/sources/record_ostream.hpp> // for operator<< +#include <boost/preprocessor/seq/limits/enum_256.hpp> // for BOOST_PP_SEQ_... +#include <boost/preprocessor/seq/limits/size_256.hpp> // for BOOST_PP_SEQ_... +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApi... +#include <gtest/gtest_pred_impl.h> // for AssertionResult, Test +#include <iosfwd> // for streamsize +#include <string> // for allocator namespace caosdb::entity { using ProtoEntity = caosdb::entity::v1alpha1::Entity; diff --git a/test/test_entity.cpp b/test/test_entity.cpp index 634e3c4c8345010e06bd2cf5cd124aebb81c4efd..f38f14457bf0b9a3fc5ddf21820615b55fd6f484 100644 --- a/test/test_entity.cpp +++ b/test/test_entity.cpp @@ -25,20 +25,15 @@ #include "caosdb/entity.h" // for Entity, Parent, Par... #include "caosdb/entity/v1alpha1/main.grpc.pb.h" // for EntityTransactionSe... #include "caosdb/entity/v1alpha1/main.pb.h" // for IdResponse, Message -#include "caosdb/logging.h" -#include "caosdb/message_code.h" // for MessageCode -#include "caosdb/protobuf_helper.h" // for get_arena -#include "caosdb/status_code.h" // for StatusCode, FILE_DO... -#include "caosdb/transaction.h" // for Transaction -#include "caosdb/value.h" // for Value -#include <boost/log/core/record.hpp> // for record -#include <boost/log/sources/record_ostream.hpp> // for record_pump<>:... -#include <boost/preprocessor/seq/limits/enum_256.hpp> // for BOOST_PP_SEQ_E... -#include <boost/preprocessor/seq/limits/size_256.hpp> // for BOOST_PP_SEQ_S... -#include <google/protobuf/arena.h> // for Arena -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for TestPartResult, Sui... -#include <gtest/gtest_pred_impl.h> // for Test, EXPECT_EQ +#include "caosdb/message_code.h" // for MessageCode +#include "caosdb/protobuf_helper.h" // for get_arena +#include "caosdb/status_code.h" // for StatusCode, FILE_DO... +#include "caosdb/transaction.h" // for Transaction +#include "caosdb/value.h" // for Value +#include <google/protobuf/arena.h> // for Arena +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult, Sui... +#include <gtest/gtest_pred_impl.h> // for Test, EXPECT_EQ #include <iostream> #include <memory> // for allocator, shared_ptr #include <string> // for operator+, string @@ -105,7 +100,7 @@ TEST(test_entity, test_append_property) { entity.AppendProperty(prop); EXPECT_EQ(entity.GetProperties().size(), 1); - auto &same_prop = entity.GetProperties().at(0); + const auto &same_prop = entity.GetProperties().at(0); EXPECT_EQ(prop.GetName(), same_prop.GetName()); EXPECT_EQ(prop.GetId(), same_prop.GetId()); @@ -233,7 +228,7 @@ TEST(test_entity, test_insert_with_property) { EXPECT_EQ(entity.GetProperties().size(), 1); - auto &inserted_prop = entity.GetProperties().at(0); + const auto &inserted_prop = entity.GetProperties().at(0); EXPECT_EQ(prop.GetName(), inserted_prop.GetName()); EXPECT_EQ(prop.GetId(), inserted_prop.GetId()); diff --git a/test/test_protobuf.cpp b/test/test_protobuf.cpp index afe4b302782a424b98c15b3bd46ad84d2ab679f2..48cfd2377e33d9f49b07660c28bbac1db49d5d65 100644 --- a/test/test_protobuf.cpp +++ b/test/test_protobuf.cpp @@ -19,12 +19,13 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. * */ +#include "caosdb/data_type.h" // for DataType, ReferenceDataType +#include "caosdb/entity.h" // for Entity #include "caosdb/entity/v1alpha1/main.pb.h" // for RepeatedPtrField, Message -#include "caosdb/entity.h" -#include "gtest/gtest-message.h" // for Message -#include "gtest/gtest-test-part.h" // for SuiteApiResolver, TestPa... -#include "gtest/gtest_pred_impl.h" // for Test, TestInfo, TEST -#include <memory> // for allocator +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestPa... +#include <gtest/gtest_pred_impl.h> // for Test, TestInfo, TEST +#include <memory> // for allocator namespace caosdb { using ProtoEntity = caosdb::entity::v1alpha1::Entity; diff --git a/test/test_value.cpp b/test/test_value.cpp index 890922e2640a78c1e65e6a0fe6e4a51907f66a0e..39a6ac4a0b7f5eadb292dbcf7b3447061892b579 100644 --- a/test/test_value.cpp +++ b/test/test_value.cpp @@ -21,13 +21,15 @@ */ #include "caosdb/value.h" // for Value -#include "caosdb/entity.h" // for Entity #include "caosdb/entity/v1alpha1/main.pb.h" // for AtomicDataType, DataType +#include <algorithm> // for max #include <cmath> // for isnan #include <gtest/gtest-message.h> // for Message #include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApi... #include <gtest/gtest_pred_impl.h> // for AssertionResult, Test -#include <memory> // for allocator +#include <initializer_list> // for initializer_list +#include <string> // for string, basic_string +#include <vector> // for vector namespace caosdb::entity { using ProtoEntity = caosdb::entity::v1alpha1::Entity;