From aff6e30b65d1940dab914df8d5985d0704cd507a Mon Sep 17 00:00:00 2001 From: Erik Frojdh Date: Tue, 14 May 2019 11:41:39 +0200 Subject: [PATCH 1/2] short sleep in socket test --- slsSupportLib/tests/test-Sockets.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/slsSupportLib/tests/test-Sockets.cpp b/slsSupportLib/tests/test-Sockets.cpp index 184cbc71e..8726c2515 100644 --- a/slsSupportLib/tests/test-Sockets.cpp +++ b/slsSupportLib/tests/test-Sockets.cpp @@ -29,6 +29,7 @@ TEST_CASE("The server recive the same message as we send", "[support]") { std::copy(std::begin(m), std::end(m), sent_message.data()); auto s = std::async(std::launch::async, server); + std::this_thread::sleep_for(std::chrono::milliseconds(100)); auto client = sls::DetectorSocket("localhost", 1950); client.sendData(sent_message.data(), sent_message.size()); client.receiveData(received_message.data(), received_message.size()); From 1029ce97051dec76f6e62c6188a12efb7e95f4f8 Mon Sep 17 00:00:00 2001 From: Erik Frojdh Date: Tue, 14 May 2019 14:53:59 +0200 Subject: [PATCH 2/2] minor --- .clang-tidy | 8 ++++---- slsDetectorSoftware/src/multiSlsDetector.cpp | 2 +- slsSupportLib/tests/test-FixedCapacityContainer.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index c70b40d30..ed80138ee 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -23,10 +23,10 @@ AnalyzeTemporaryDtors: false FormatStyle: none CheckOptions: - { key: readability-identifier-naming.NamespaceCase, value: lower_case } - - { key: readability-identifier-naming.FunctionCase, value: lower_case } + # - { key: readability-identifier-naming.FunctionCase, value: lower_case } - { key: readability-identifier-naming.ClassCase, value: CamelCase } - - { key: readability-identifier-naming.MethodCase, value: CamelCase } - - { key: readability-identifier-naming.StructCase, value: CamelCase } - - { key: readability-identifier-naming.VariableCase, value: lower_case } + # - { key: readability-identifier-naming.MethodCase, value: CamelCase } + # - { key: readability-identifier-naming.StructCase, value: CamelCase } + # - { key: readability-identifier-naming.VariableCase, value: lower_case } - { key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE } ... diff --git a/slsDetectorSoftware/src/multiSlsDetector.cpp b/slsDetectorSoftware/src/multiSlsDetector.cpp index 231151328..a227fb1eb 100755 --- a/slsDetectorSoftware/src/multiSlsDetector.cpp +++ b/slsDetectorSoftware/src/multiSlsDetector.cpp @@ -421,7 +421,7 @@ void multiSlsDetector::addSlsDetector(const std::string &hostname) { } // get type by connecting - detectorType type = slsDetector::getTypeFromDetector(hostname.c_str(), DEFAULT_PORTNO); + detectorType type = slsDetector::getTypeFromDetector(hostname, DEFAULT_PORTNO); int pos = (int)detectors.size(); detectors.push_back(sls::make_unique(type, multiId, pos, false)); multi_shm()->numberOfDetectors = detectors.size(); diff --git a/slsSupportLib/tests/test-FixedCapacityContainer.cpp b/slsSupportLib/tests/test-FixedCapacityContainer.cpp index a5c931a12..9277df258 100644 --- a/slsSupportLib/tests/test-FixedCapacityContainer.cpp +++ b/slsSupportLib/tests/test-FixedCapacityContainer.cpp @@ -10,7 +10,7 @@ SCENARIO("FixedCapacityContainers can be sized and resized", "[support]") { FixedCapacityContainer vec; REQUIRE(vec.empty()); - REQUIRE(vec.size() == 0); + REQUIRE(vec.size() == 0); //NOLINT REQUIRE(vec.capacity() == n_elem); REQUIRE(sizeof(vec) == sizeof(int) * n_elem + sizeof(size_t));