diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-09-13 10:56:55 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2016-09-14 09:16:50 +0000 |
commit | 6b228b92b44c473c773011cb043c10177b95bf66 (patch) | |
tree | 7759339e0877b2c052c7d5a4b086dc321eeab84c /filedistribution/src/tests/rpc/testfileprovider.cpp | |
parent | 0a53d3cc952885d03b7c643e1153370df5819891 (diff) |
Use SP typeddef to get the ensure coorrect shared_ptr in use.
Diffstat (limited to 'filedistribution/src/tests/rpc/testfileprovider.cpp')
-rw-r--r-- | filedistribution/src/tests/rpc/testfileprovider.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/filedistribution/src/tests/rpc/testfileprovider.cpp b/filedistribution/src/tests/rpc/testfileprovider.cpp index 1291932c8a6..5c1dd0451ab 100644 --- a/filedistribution/src/tests/rpc/testfileprovider.cpp +++ b/filedistribution/src/tests/rpc/testfileprovider.cpp @@ -17,7 +17,7 @@ const std::string MockFileProvider::_queueForeverFileReference("queue-forever"); BOOST_AUTO_TEST_CASE(fileDistributionRPCTest) { const std::string spec("tcp/localhost:9111"); - std::shared_ptr<fd::MockFileProvider> provider(new fd::MockFileProvider()); + fd::FileProvider::SP provider(new fd::MockFileProvider()); fd::FileDistributorRPC::SP fileDistributorRPC(new fd::FileDistributorRPC(spec, provider)); fileDistributorRPC->start(); @@ -37,7 +37,7 @@ BOOST_AUTO_TEST_CASE(fileDistributionRPCTest) { //must be run through valgrind BOOST_AUTO_TEST_CASE(require_that_queued_requests_does_not_leak_memory) { const std::string spec("tcp/localhost:9111"); - std::shared_ptr<MockFileProvider> provider(new MockFileProvider()); + fd::FileProvider::SP provider(new fd::MockFileProvider()); fd::FileDistributorRPC::SP fileDistributorRPC(new fd::FileDistributorRPC(spec, provider)); fileDistributorRPC->start(); @@ -51,7 +51,7 @@ BOOST_AUTO_TEST_CASE(require_that_queued_requests_does_not_leak_memory) { request->GetParams()->AddString(MockFileProvider::_queueForeverFileReference.c_str()); target->InvokeVoid(request); - provider->_queueForeverBarrier.wait(); //the request has been enqueued. + static_cast<fd::MockFileProvider &>(*provider)._queueForeverBarrier.wait(); //the request has been enqueued. fileDistributorRPC.reset(); target->SubRef(); |