asset:// URLs are local to the executable path now
This commit is contained in:
@@ -26,14 +26,14 @@ TEST_F(Storage, HTTPError) {
|
||||
|
||||
fs.request({ Resource::Unknown, "http://127.0.0.1:3000/temporary-error" }, uv_default_loop(), [&](const Response &res) {
|
||||
const auto duration = double(uv_hrtime() - start) / 1e9;
|
||||
EXPECT_GT(duration, 1) << "Backoff timer didn't wait 1 second";
|
||||
EXPECT_LT(duration, 1.2) << "Backoff timer fired too late";
|
||||
EXPECT_EQ(res.status, Response::Successful);
|
||||
EXPECT_EQ(res.data, "Hello World!");
|
||||
EXPECT_EQ(res.expires, 0);
|
||||
EXPECT_EQ(res.modified, 0);
|
||||
EXPECT_EQ(res.etag, "");
|
||||
EXPECT_EQ(res.message, "");
|
||||
EXPECT_LT(1, duration) << "Backoff timer didn't wait 1 second";
|
||||
EXPECT_GT(1.2, duration) << "Backoff timer fired too late";
|
||||
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);
|
||||
|
||||
HTTPTemporaryError.finish();
|
||||
});
|
||||
@@ -41,14 +41,14 @@ TEST_F(Storage, HTTPError) {
|
||||
fs.request({ Resource::Unknown, "http://127.0.0.1:3001/" }, uv_default_loop(), [&](const Response &res) {
|
||||
const auto duration = double(uv_hrtime() - start) / 1e9;
|
||||
// 1.5 seconds == 4 retries, with a 500ms timeout (see above).
|
||||
EXPECT_GT(duration, 1.5) << "Resource wasn't retried the correct number of times";
|
||||
EXPECT_LT(duration, 1.7) << "Resource wasn't retried the correct number of times";
|
||||
EXPECT_EQ(res.status, Response::Error);
|
||||
EXPECT_LT(1.5, duration) << "Resource wasn't retried the correct number of times";
|
||||
EXPECT_GT(1.7, duration) << "Resource wasn't retried the correct number of times";
|
||||
EXPECT_EQ(Response::Error, res.status);
|
||||
EXPECT_TRUE(res.message == "Couldn't connect to server" || res.message == "The operation couldn’t be completed. (NSURLErrorDomain error -1004.)");
|
||||
EXPECT_EQ(res.data, "");
|
||||
EXPECT_EQ(res.expires, 0);
|
||||
EXPECT_EQ(res.modified, 0);
|
||||
EXPECT_EQ(res.etag, "");
|
||||
EXPECT_EQ("", res.data);
|
||||
EXPECT_EQ(0, res.expires);
|
||||
EXPECT_EQ(0, res.modified);
|
||||
EXPECT_EQ("", res.etag);
|
||||
HTTPConnectionError.finish();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user