2626
2727#include < boost/asio/thread_pool.hpp>
2828#include < boost/json/parse.hpp>
29- #include < boost/json/serialize.hpp>
30- #include < boost/json/value.hpp>
31- #include < boost/json/value_from.hpp>
3229#include < boost/json/value_to.hpp>
3330#include < boost/uuid/random_generator.hpp>
3431#include < boost/uuid/uuid.hpp>
35- #include < boost/uuid/uuid_io.hpp>
3632#include < gmock/gmock.h>
3733#include < gtest/gtest.h>
3834
@@ -91,7 +87,7 @@ TEST_F(ClusterBackendTest, SubscribeToNewState)
9187 EXPECT_CALL (callbackMock, Call)
9288 .Times (testing::AtLeast (1 ))
9389 .WillRepeatedly ([this ](ClioNode::CUuid selfId, std::shared_ptr<Backend::ClusterData const > clusterData) {
94- SemaphoreReleaseGuard guard{semaphore};
90+ SemaphoreReleaseGuard const guard{semaphore};
9591 ASSERT_TRUE (clusterData->has_value ());
9692 EXPECT_EQ (clusterData->value ().size (), 1 );
9793 auto const & nodeData = clusterData->value ().front ();
@@ -141,7 +137,7 @@ TEST_F(ClusterBackendTest, FetchClioNodesDataThrowsException)
141137 EXPECT_CALL (callbackMock, Call)
142138 .Times (testing::AtLeast (1 ))
143139 .WillRepeatedly ([this ](ClioNode::CUuid, std::shared_ptr<Backend::ClusterData const > clusterData) {
144- SemaphoreReleaseGuard guard{semaphore};
140+ SemaphoreReleaseGuard const guard{semaphore};
145141 ASSERT_FALSE (clusterData->has_value ());
146142 EXPECT_EQ (clusterData->error (), " Failed to fetch Clio nodes data" );
147143 });
@@ -181,7 +177,7 @@ TEST_F(ClusterBackendTest, FetchClioNodesDataReturnsDataWithOtherNodes)
181177 EXPECT_CALL (callbackMock, Call)
182178 .Times (testing::AtLeast (1 ))
183179 .WillRepeatedly ([&](ClioNode::CUuid selfId, std::shared_ptr<Backend::ClusterData const > clusterData) {
184- SemaphoreReleaseGuard guard{semaphore};
180+ SemaphoreReleaseGuard const guard{semaphore};
185181 ASSERT_TRUE (clusterData->has_value ()) << clusterData->error ();
186182 EXPECT_EQ (clusterData->value ().size (), 2 );
187183 EXPECT_EQ (selfId, clusterBackend.selfId ());
@@ -231,7 +227,7 @@ TEST_F(ClusterBackendTest, FetchClioNodesDataReturnsOnlySelfData)
231227 EXPECT_CALL (callbackMock, Call)
232228 .Times (testing::AtLeast (1 ))
233229 .WillRepeatedly ([this ](ClioNode::CUuid selfId, std::shared_ptr<Backend::ClusterData const > clusterData) {
234- SemaphoreReleaseGuard guard{semaphore};
230+ SemaphoreReleaseGuard const guard{semaphore};
235231 ASSERT_TRUE (clusterData->has_value ());
236232 EXPECT_EQ (clusterData->value ().size (), 1 );
237233 auto const & nodeData = clusterData->value ().front ();
@@ -269,7 +265,7 @@ TEST_F(ClusterBackendTest, FetchClioNodesDataReturnsInvalidJson)
269265 EXPECT_CALL (callbackMock, Call)
270266 .Times (testing::AtLeast (1 ))
271267 .WillRepeatedly ([this , invalidJson](ClioNode::CUuid, std::shared_ptr<Backend::ClusterData const > clusterData) {
272- SemaphoreReleaseGuard guard{semaphore};
268+ SemaphoreReleaseGuard const guard{semaphore};
273269 ASSERT_FALSE (clusterData->has_value ());
274270 EXPECT_THAT (clusterData->error (), testing::HasSubstr (" Error parsing json from DB" ));
275271 EXPECT_THAT (clusterData->error (), testing::HasSubstr (invalidJson));
@@ -307,7 +303,7 @@ TEST_F(ClusterBackendTest, FetchClioNodesDataReturnsValidJsonButCannotConvertToC
307303 EXPECT_CALL (callbackMock, Call)
308304 .Times (testing::AtLeast (1 ))
309305 .WillRepeatedly ([this ](ClioNode::CUuid, std::shared_ptr<Backend::ClusterData const > clusterData) {
310- SemaphoreReleaseGuard guard{semaphore};
306+ SemaphoreReleaseGuard const guard{semaphore};
311307 ASSERT_FALSE (clusterData->has_value ());
312308 EXPECT_THAT (clusterData->error (), testing::HasSubstr (" Error converting json to ClioNode" ));
313309 });
@@ -334,7 +330,7 @@ TEST_F(ClusterBackendTest, WriteNodeMessageWritesSelfDataWithRecentTimestampAndD
334330 EXPECT_CALL (*backend_, writeNodeMessage)
335331 .Times (testing::AtLeast (1 ))
336332 .WillRepeatedly ([&](boost::uuids::uuid const & uuid, std::string message) {
337- SemaphoreReleaseGuard guard{semaphore};
333+ SemaphoreReleaseGuard const guard{semaphore};
338334 auto const afterWrite = std::chrono::system_clock::now ();
339335
340336 EXPECT_EQ (uuid, *clusterBackend.selfId ());
0 commit comments