From d0613b56cea7eba0604e0548bddffd773a4eb554 Mon Sep 17 00:00:00 2001 From: Matteo Martincigh Date: Wed, 9 Oct 2019 16:47:04 +0100 Subject: IVGCVSW-3937 Improve the Connection Acknowledged Handler * The Connection Acknowledged Handler should report an error is it's called while in a wrong state * Stopping the threads in the ProfilingService before having to start them again * Updated the unit tests to check the changes * Removed unnecessary Packet.cpp file * Fixed memory leak Signed-off-by: Matteo Martincigh Change-Id: I8c4d33b4d97994df86fe6c9f8c659f880ec64c16 --- src/profiling/test/SendCounterPacketTests.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/profiling/test/SendCounterPacketTests.cpp') diff --git a/src/profiling/test/SendCounterPacketTests.cpp b/src/profiling/test/SendCounterPacketTests.cpp index 1216420383..00dad38078 100644 --- a/src/profiling/test/SendCounterPacketTests.cpp +++ b/src/profiling/test/SendCounterPacketTests.cpp @@ -2322,7 +2322,7 @@ BOOST_AUTO_TEST_CASE(SendThreadBufferTest1) BOOST_TEST(reservedBuffer.get()); // Check that data was actually written to the profiling connection in any order - const std::vector& writtenData = mockProfilingConnection.GetWrittenData(); + const std::vector writtenData = mockProfilingConnection.GetWrittenData(); BOOST_TEST(writtenData.size() == 3); bool foundStreamMetaDataPacket = std::find(writtenData.begin(), writtenData.end(), streamMetadataPacketsize) != writtenData.end(); @@ -2391,7 +2391,7 @@ BOOST_AUTO_TEST_CASE(SendThreadSendStreamMetadataPacket3) BOOST_CHECK_NO_THROW(sendCounterPacket.Stop()); // Check that the buffer contains one Stream Metadata packet - const std::vector& writtenData = mockProfilingConnection.GetWrittenData(); + const std::vector writtenData = mockProfilingConnection.GetWrittenData(); BOOST_TEST(writtenData.size() == 1); BOOST_TEST(writtenData[0] == streamMetadataPacketsize); } @@ -2420,7 +2420,7 @@ BOOST_AUTO_TEST_CASE(SendThreadSendStreamMetadataPacket4) BOOST_TEST((profilingStateMachine.GetCurrentState() == ProfilingState::WaitingForAck)); // Check that the buffer contains one Stream Metadata packet - const std::vector& writtenData = mockProfilingConnection.GetWrittenData(); + const std::vector writtenData = mockProfilingConnection.GetWrittenData(); BOOST_TEST(writtenData.size() == 1); BOOST_TEST(writtenData[0] == streamMetadataPacketsize); -- cgit v1.2.1