From 7137239cbddb13e1c33240d13002973b5a222775 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 12 Nov 2015 15:51:45 -0800 Subject: [core] Use std::unique_ptr for FileSource request --- test/storage/http_timeout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/storage/http_timeout.cpp') diff --git a/test/storage/http_timeout.cpp b/test/storage/http_timeout.cpp index d59ca3cb77..2c1a1f1f60 100644 --- a/test/storage/http_timeout.cpp +++ b/test/storage/http_timeout.cpp @@ -18,7 +18,7 @@ TEST_F(Storage, HTTPTimeout) { int counter = 0; const Resource resource { Resource::Unknown, "http://127.0.0.1:3000/test?cachecontrol=max-age=1" }; - Request* req = fs.request(resource, [&](Response res) { + std::unique_ptr req = fs.request(resource, [&](Response res) { counter++; EXPECT_EQ(nullptr, res.error); EXPECT_EQ(false, res.stale); @@ -28,7 +28,7 @@ TEST_F(Storage, HTTPTimeout) { EXPECT_EQ(0, res.modified); EXPECT_EQ("", res.etag); if (counter == 4) { - fs.cancel(req); + req.reset(); loop.stop(); HTTPTimeout.finish(); } -- cgit v1.2.1