[core] Do not pass uv_loop_t around
This should be abstracted by util::RunLoop
This commit is contained in:
committed by
John Firebaugh
parent
2eb0203bf4
commit
36581f3d30
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user