summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/storage/http_noloop.cpp38
-rw-r--r--test/storage/http_reading.cpp17
-rw-r--r--test/test.gypi1
3 files changed, 0 insertions, 56 deletions
diff --git a/test/storage/http_noloop.cpp b/test/storage/http_noloop.cpp
deleted file mode 100644
index e133d3e0c2..0000000000
--- a/test/storage/http_noloop.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-#include "storage.hpp"
-
-#include <uv.h>
-
-#include <mbgl/storage/default_file_source.hpp>
-#include <mbgl/util/uv.hpp>
-
-TEST_F(Storage, HTTPNoLoop) {
- SCOPED_TEST(HTTPNoLoop)
-
- using namespace mbgl;
-
- DefaultFileSource fs(nullptr);
-
- const auto mainThread = uv_thread_self();
-
- // Async handle that keeps the main loop alive until the thread finished
- auto async = new uv_async_t;
- uv_async_init(uv_default_loop(), async, [] (uv_async_t *as, int) {
- uv::close(as);
- });
-
- fs.request({ Resource::Unknown, "http://127.0.0.1:3000/temporary-error" }, nullptr,
- [&](const Response &res) {
- EXPECT_NE(uv_thread_self(), mainThread) << "Response was called in the same thread";
- EXPECT_EQ(Response::Successful, res.status);
- EXPECT_EQ("Hello World!", res.data);
- EXPECT_EQ(0, res.expires);
- EXPECT_EQ(0, res.modified);
- EXPECT_EQ("", res.etag);
- EXPECT_EQ("", res.message);
- HTTPNoLoop.finish();
-
- uv_async_send(async);
- });
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-}
diff --git a/test/storage/http_reading.cpp b/test/storage/http_reading.cpp
index 09d33fd6ab..b322bbf2a7 100644
--- a/test/storage/http_reading.cpp
+++ b/test/storage/http_reading.cpp
@@ -56,20 +56,3 @@ TEST_F(Storage, HTTPNoCallback) {
HTTPTest.finish();
}
-
-TEST_F(Storage, HTTPCallbackNotOnLoop) {
- using namespace mbgl;
-
- DefaultFileSource fs(nullptr);
-
- SCOPED_TEST(HTTPTest)
-
- std::promise<void> promise;
- fs.request({ Resource::Unknown, "http://127.0.0.1:3000/test" }, [&] (const Response &) {
- promise.set_value();
- });
-
- promise.get_future().get();
-
- HTTPTest.finish();
-}
diff --git a/test/test.gypi b/test/test.gypi
index 03bceaae4b..75301751cf 100644
--- a/test/test.gypi
+++ b/test/test.gypi
@@ -71,7 +71,6 @@
'storage/http_header_parsing.cpp',
'storage/http_issue_1369.cpp',
'storage/http_load.cpp',
- 'storage/http_noloop.cpp',
'storage/http_other_loop.cpp',
'storage/http_reading.cpp',
],