Commit cc39155d authored by Matt Menke's avatar Matt Menke Committed by Commit Bot

Revert "network::HttpServer tests: Wait for the HttpServer to start listening."

This reverts commit 966cd90b.

Reason for revert: Turns out that we are actually starting to listen synchronously, since that call doesn't go over mojo, so this didn't accomplish anything.

Original change's description:
> network::HttpServer tests:  Wait for the HttpServer to start listening.
> 
> The tests use an HttpServer run over a Mojo connection, but they don't
> ensure that the HttpServer has started listening for connections before
> trying to establish a connection to the server over a client socket
> (also used over Mojo). The tests seem to be passing, but it sometimes
> times out on Fuchsia, when the HttpServer tries to accept a second
> socket. This seems likely due to some other bug (possibly in the
> Fuchsia socket layer), but regardless of the underlying cause, having
> the test fixture wait for the server to start listening seems to make
> the test consistently pass, and is something the tests should be doing
> anyways.
> 
> Bug: 1032620
> Change-Id: I48b57e99923189496d4e405f84a22767ca42a68a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1992205
> Reviewed-by: Maksim Orlovich <morlovich@chromium.org>
> Commit-Queue: Matt Menke <mmenke@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#729477}

TBR=mmenke@chromium.org,morlovich@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1032620
Change-Id: I45c8283101306e5627d9b696f176a2d357dfff69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2019790Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Reviewed-by: default avatarWez <wez@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735380}
parent cabf1bd7
...@@ -188,11 +188,7 @@ class HttpServerTest : public testing::Test, public HttpServer::Delegate { ...@@ -188,11 +188,7 @@ class HttpServerTest : public testing::Test, public HttpServer::Delegate {
run_loop.Run(); run_loop.Run();
EXPECT_EQ(net::OK, net_error); EXPECT_EQ(net::OK, net_error);
server_ = std::make_unique<HttpServer>(std::move(server_socket_), this); server_.reset(new HttpServer(std::move(server_socket_), this));
// Wait for the HttpServer to start accepting connections. Since this is
// done in response to a request sent over a Mojo socket, it happens
// asynchronously.
base::RunLoop().RunUntilIdle();
} }
void OnConnect(int connection_id) override { void OnConnect(int connection_id) override {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment