diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-12 16:51:30 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-12 16:51:30 +0000 |
commit | cef642ead38f856b5f25b1870660f051a2ce9fcb (patch) | |
tree | d455cb9ff64b05fa0a5bd91208d91f2232e26e30 /net/test | |
parent | 5e61ad9e375347ef4eebac900a5af6572ae2d995 (diff) | |
download | chromium_src-cef642ead38f856b5f25b1870660f051a2ce9fcb.zip chromium_src-cef642ead38f856b5f25b1870660f051a2ce9fcb.tar.gz chromium_src-cef642ead38f856b5f25b1870660f051a2ce9fcb.tar.bz2 |
Avoid long test_server timeouts by using action_timeout_ms
instead of action_max_timeout_ms.
This increases action_timeout_ms a little bit,
otherwise test_server becomes more flaky (fails to start in time).
This effectively reduces the timeout for TestServer start from 45s to 10s.
BUG=93770
Review URL: http://codereview.chromium.org/7744004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100706 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/test')
-rw-r--r-- | net/test/test_server.cc | 6 | ||||
-rw-r--r-- | net/test/test_server_posix.cc | 2 | ||||
-rw-r--r-- | net/test/test_server_win.cc | 2 |
3 files changed, 2 insertions, 8 deletions
diff --git a/net/test/test_server.cc b/net/test/test_server.cc index d76430d..faf1090 100644 --- a/net/test/test_server.cc +++ b/net/test/test_server.cc @@ -39,12 +39,6 @@ namespace net { namespace { -// Number of connection attempts for tests. -const int kServerConnectionAttempts = 10; - -// Connection timeout in milliseconds for tests. -const int kServerConnectionTimeoutMs = 1000; - std::string GetHostname(TestServer::Type type, const TestServer::HTTPSOptions& options) { if (type == TestServer::TYPE_HTTPS && diff --git a/net/test/test_server_posix.cc b/net/test/test_server_posix.cc index 2efc54f..1200824 100644 --- a/net/test/test_server_posix.cc +++ b/net/test/test_server_posix.cc @@ -136,7 +136,7 @@ bool TestServer::WaitToStart() { file_util::ScopedFD child_fd_closer(child_fd_closer_.release()); base::TimeDelta remaining_time = base::TimeDelta::FromMilliseconds( - TestTimeouts::action_max_timeout_ms()); + TestTimeouts::action_timeout_ms()); uint32 server_data_len = 0; if (!ReadData(child_fd_, sizeof(server_data_len), diff --git a/net/test/test_server_win.cc b/net/test/test_server_win.cc index a93e6dc..5d7fa88 100644 --- a/net/test/test_server_win.cc +++ b/net/test/test_server_win.cc @@ -52,7 +52,7 @@ bool ReadData(HANDLE read_fd, HANDLE write_fd, thread.message_loop()->PostDelayedTask( FROM_HERE, NewRunnableFunction(UnblockPipe, write_fd, bytes_max, &unblocked), - TestTimeouts::action_max_timeout_ms()); + TestTimeouts::action_timeout_ms()); DWORD bytes_read = 0; while (bytes_read < bytes_max) { |