Remove Environment::terminate and associated code

Fixes #1336
This commit is contained in:
John Firebaugh
2015-04-27 13:05:30 -07:00
parent 8e5fa341eb
commit c0b75f1af7
24 changed files with 42 additions and 193 deletions

View File

@@ -22,12 +22,10 @@ TEST_F(Storage, HTTPError) {
DefaultFileSource fs(nullptr);
auto &env = *static_cast<const Environment *>(nullptr);
auto start = uv_hrtime();
fs.request({ Resource::Unknown, "http://127.0.0.1:3000/temporary-error" }, uv_default_loop(),
env, [&](const Response &res) {
[&](const Response &res) {
const auto duration = double(uv_hrtime() - start) / 1e9;
EXPECT_LT(1, duration) << "Backoff timer didn't wait 1 second";
EXPECT_GT(1.2, duration) << "Backoff timer fired too late";
@@ -41,7 +39,7 @@ TEST_F(Storage, HTTPError) {
HTTPTemporaryError.finish();
});
fs.request({ Resource::Unknown, "http://127.0.0.1:3001/" }, uv_default_loop(), env,
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).