summaryrefslogtreecommitdiff
path: root/test/storage/http_other_loop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/storage/http_other_loop.cpp')
-rw-r--r--test/storage/http_other_loop.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/storage/http_other_loop.cpp b/test/storage/http_other_loop.cpp
index b00d54eb7b..3f50134de5 100644
--- a/test/storage/http_other_loop.cpp
+++ b/test/storage/http_other_loop.cpp
@@ -3,6 +3,7 @@
#include <uv.h>
#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/util/run_loop.hpp>
TEST_F(Storage, HTTPOtherLoop) {
SCOPED_TEST(HTTPOtherLoop)
@@ -11,8 +12,9 @@ TEST_F(Storage, HTTPOtherLoop) {
// This file source launches a separate thread to do the processing.
DefaultFileSource fs(nullptr);
+ util::RunLoop loop(uv_default_loop());
- Request* req = fs.request({ Resource::Unknown, "http://127.0.0.1:3000/test" }, uv_default_loop(),
+ Request* req = fs.request({ Resource::Unknown, "http://127.0.0.1:3000/test" },
[&](const Response &res) {
fs.cancel(req);
EXPECT_EQ(nullptr, res.error);
@@ -22,6 +24,7 @@ TEST_F(Storage, HTTPOtherLoop) {
EXPECT_EQ(0, res.expires);
EXPECT_EQ(0, res.modified);
EXPECT_EQ("", res.etag);
+ loop.stop();
HTTPOtherLoop.finish();
});