From 4695a7b0840f0e38330835c65c139ee9e10916f1 Mon Sep 17 00:00:00 2001 From: Carsten Patzke <carsten.patzke@desy.de> Date: Fri, 15 Dec 2017 17:03:50 +0100 Subject: [PATCH] removed old test --- producer/api/unittests/test_producer_impl.cpp | 90 ------------------- 1 file changed, 90 deletions(-) diff --git a/producer/api/unittests/test_producer_impl.cpp b/producer/api/unittests/test_producer_impl.cpp index 38ca3c83f..8d959b332 100644 --- a/producer/api/unittests/test_producer_impl.cpp +++ b/producer/api/unittests/test_producer_impl.cpp @@ -1627,94 +1627,4 @@ TEST(ProducerImpl, Send) { ASSERT_THAT(status, hidra2::PRODUCER_STATUS__CONNECTED); } -// -//TEST(ProducerImpl, Send) { -// hidra2::ProducerImpl producer; -// uint64_t expected_request_id = 0; -// int expected_fd = 83942; -// std::string expected_address = "127.0.0.1:9090"; -// -// hidra2::MockIO mockIO; -// producer.__set_io(&mockIO); -// -// InSequence sequence; -// -// std::string expected_filename = "somefilename.bin"; -// void* expected_file_buffer = (void*)0xC0FFEE; -// size_t expected_file_size = (size_t)1024 * (size_t)1024 * (size_t)1024 * (size_t)4 + (size_t)300; -// uint64_t expected_file_ref_id = 1337; -// -// -// /* PrepareSendDataRequest */ -// EXPECT_CALL(mockIO, Send(expected_fd, M_CheckPrepareSendDataRequest(expected_request_id, expected_filename, -// expected_file_size), sizeof(hidra2::PrepareSendDataRequest), _)) -// .Times(1) -// .WillOnce( -// DoAll( -// testing::SetArgPointee<3>(hidra2::IOError::NO_ERROR), -// Return(sizeof(hidra2::PrepareSendDataRequest)) -// )); -// -// /* PrepareSendDataResponse */ -// EXPECT_CALL(mockIO, ReceiveTimeout(expected_fd, _/*addr*/, sizeof(hidra2::PrepareSendDataResponse), Gt(0), _)) -// .Times(1) -// .WillOnce( -// DoAll( -// A_WritePrepareSendDataResponse(hidra2::NET_ERR__NO_ERROR, expected_request_id, expected_file_ref_id), -// testing::SetArgPointee<4>(hidra2::IOError::NO_ERROR), -// Return(sizeof(hidra2::PrepareSendDataResponse)) -// )); -// -// expected_request_id++; -// -// -// size_t already_Send = 0; -// -// while(already_Send < expected_file_size) { -// -// size_t need_to_Send = producer.kMaxChunkSize; -// if(double(expected_file_size) - already_Send - producer.kMaxChunkSize < 0) { -// need_to_Send = expected_file_size - already_Send; -// } -// -// /* SendDataChunkRequest */ -// EXPECT_CALL(mockIO, Send(expected_fd, M_CheckSendDataChunkRequest(expected_request_id, expected_file_ref_id, -// need_to_Send, already_Send), sizeof(hidra2::SendDataChunkRequest), _)) -// .Times(1) -// .WillOnce( -// DoAll( -// testing::SetArgPointee<3>(hidra2::IOError::NO_ERROR), -// Return(sizeof(hidra2::SendDataChunkRequest)) -// )); -// -// EXPECT_CALL(mockIO, Send(expected_fd, (uint8_t*)expected_file_buffer + already_Send, need_to_Send, _)) -// .Times(1) -// .WillOnce( -// DoAll( -// testing::SetArgPointee<3>(hidra2::IOError::NO_ERROR), -// Return(need_to_Send) -// )); -// -// /* SendDataChunkResponse */ -// EXPECT_CALL(mockIO, ReceiveTimeout(expected_fd, _/*addr*/, sizeof(hidra2::SendDataChunkResponse), Gt(0), _)) -// .Times(1) -// .WillOnce( -// DoAll( -// A_WriteSendDataChunkResponse(hidra2::NET_ERR__NO_ERROR, expected_request_id), -// testing::SetArgPointee<4>(hidra2::IOError::NO_ERROR), -// Return(sizeof(hidra2::SendDataChunkResponse)) -// )); -// -// expected_request_id++; -// -// already_Send += need_to_Send; -// } -// -// hidra2::ProducerError error = producer.Send(expected_filename, expected_file_buffer, expected_file_size); -// -// ASSERT_THAT(error, Eq(hidra2::PRODUCER_ERROR__NO_ERROR)); -// -// Mock::VerifyAndClearExpectations(&mockIO); -//} - } -- GitLab