Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: http_fetcher_unittest.cc

Issue 3187005: Increase retry timeout to 1 minute. (Closed) Base URL: http://src.chromium.org/git/update_engine.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | libcurl_http_fetcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <unistd.h> 5 #include <unistd.h>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 #include <base/scoped_ptr.h> 8 #include <base/scoped_ptr.h>
9 #include <glib.h> 9 #include <glib.h>
10 #include <gtest/gtest.h> 10 #include <gtest/gtest.h>
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 GPid pid_; 115 GPid pid_;
116 bool started_; 116 bool started_;
117 bool validate_quit_; 117 bool validate_quit_;
118 }; 118 };
119 119
120 template <> 120 template <>
121 class HttpFetcherTest<LibcurlHttpFetcher> : public ::testing::Test { 121 class HttpFetcherTest<LibcurlHttpFetcher> : public ::testing::Test {
122 public: 122 public:
123 HttpFetcher* NewLargeFetcher() { 123 HttpFetcher* NewLargeFetcher() {
124 LibcurlHttpFetcher *ret = new LibcurlHttpFetcher; 124 LibcurlHttpFetcher *ret = new LibcurlHttpFetcher;
125 ret->set_idle_ms(1000); // speeds up test execution 125 // Speed up test execution.
126 ret->set_idle_seconds(1);
127 ret->set_retry_seconds(1);
126 return ret; 128 return ret;
127 } 129 }
128 HttpFetcher* NewSmallFetcher() { 130 HttpFetcher* NewSmallFetcher() {
129 return NewLargeFetcher(); 131 return NewLargeFetcher();
130 } 132 }
131 string BigUrl() const { 133 string BigUrl() const {
132 return LocalServerUrlForPath("/big"); 134 return LocalServerUrlForPath("/big");
133 } 135 }
134 string SmallUrl() const { 136 string SmallUrl() const {
135 return LocalServerUrlForPath("/foo"); 137 return LocalServerUrlForPath("/foo");
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 444
443 g_timeout_add(0, StartTransfer, &start_xfer_args); 445 g_timeout_add(0, StartTransfer, &start_xfer_args);
444 g_main_loop_run(loop); 446 g_main_loop_run(loop);
445 447
446 // Exiting and testing happens in the delegate 448 // Exiting and testing happens in the delegate
447 } 449 }
448 g_main_loop_unref(loop); 450 g_main_loop_unref(loop);
449 } 451 }
450 452
451 } // namespace chromeos_update_engine 453 } // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « no previous file | libcurl_http_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698