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

Issue 2562893002: Adds ScopedPortExceptions to EmbeddedTestServer. (Closed)

Created:
4 years ago by rohitrao (ping after 24h)
Modified:
4 years ago
Reviewers:
svaldez, mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Retry until EmbeddedTestServer is listening on a valid port. The net stack will not send HTTP requests to a specific set of blacklisted ports, but the OS may assign one of those ports to the EmbeddedTestServer. This was causing spurious net_unittests failures on iOS when it happened. This CL modifies the EmbeddedTestServer to retry until it is assigned a non-blacklisted port. BUG=607630 Committed: https://crrev.com/a501df838c21aa2087b0546dfa8ecce12b5fa08c Cr-Commit-Position: refs/heads/master@{#437602}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Disable by default. #

Patch Set 3 : Remove Disable(). #

Patch Set 4 : Another approach #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -14 lines) Patch
M net/test/embedded_test_server/embedded_test_server.cc View 1 2 3 3 chunks +31 lines, -14 lines 0 comments Download

Messages

Total messages: 34 (16 generated)
svaldez
https://codereview.chromium.org/2562893002/diff/1/net/test/embedded_test_server/embedded_test_server.cc File net/test/embedded_test_server/embedded_test_server.cc (right): https://codereview.chromium.org/2562893002/diff/1/net/test/embedded_test_server/embedded_test_server.cc#newcode239 net/test/embedded_test_server/embedded_test_server.cc:239: void EmbeddedTestServer::SetPortExceptionEnabled(bool enabled) { Might as well default this ...
4 years ago (2016-12-09 15:26:53 UTC) #2
rohitrao (ping after 24h)
Updated to add the exception by default, with a method to disable it if desired. ...
4 years ago (2016-12-09 16:08:53 UTC) #5
svaldez
lgtm, though you'll need someone for an owners stamp.
4 years ago (2016-12-09 16:28:41 UTC) #6
rohitrao (ping after 24h)
On 2016/12/09 16:08:53, rohitrao wrote: > Updated to add the exception by default, with a ...
4 years ago (2016-12-09 16:28:52 UTC) #7
rohitrao (ping after 24h)
+mmenke for OWNERS approval If no tests currently need the DisableUnsafePortException() method, should I just ...
4 years ago (2016-12-09 16:30:19 UTC) #9
svaldez
On 2016/12/09 16:30:19, rohitrao wrote: > +mmenke for OWNERS approval > > If no tests ...
4 years ago (2016-12-09 16:36:53 UTC) #10
mmenke
On 2016/12/09 16:30:19, rohitrao wrote: > +mmenke for OWNERS approval > > If no tests ...
4 years ago (2016-12-09 16:44:01 UTC) #11
rohitrao (ping after 24h)
Removed the Disable() method and updated the code a bit to make it look more ...
4 years ago (2016-12-09 16:44:06 UTC) #12
mmenke
On 2016/12/09 16:44:06, rohitrao wrote: > Removed the Disable() method and updated the code a ...
4 years ago (2016-12-09 16:45:48 UTC) #13
rohitrao (ping after 24h)
> Note that the ERR_UNSAFE_PORT comes from the client side of the connection, not > ...
4 years ago (2016-12-09 16:47:10 UTC) #14
mmenke
On 2016/12/09 16:47:10, rohitrao wrote: > > Note that the ERR_UNSAFE_PORT comes from the client ...
4 years ago (2016-12-09 16:56:09 UTC) #17
svaldez
On 2016/12/09 16:47:10, rohitrao wrote: > > Note that the ERR_UNSAFE_PORT comes from the client ...
4 years ago (2016-12-09 16:57:12 UTC) #18
rohitrao (ping after 24h)
> Looping around in InitializeAndListen might be right > > // Don't loop if we ...
4 years ago (2016-12-09 17:04:13 UTC) #19
rohitrao (ping after 24h)
Updated to try up to 5 times.
4 years ago (2016-12-09 17:19:26 UTC) #22
mmenke
LGTM
4 years ago (2016-12-09 18:08:45 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2562893002/60001
4 years ago (2016-12-09 18:42:51 UTC) #29
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years ago (2016-12-09 19:11:11 UTC) #32
commit-bot: I haz the power
4 years ago (2016-12-12 14:36:43 UTC) #34
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/a501df838c21aa2087b0546dfa8ecce12b5fa08c
Cr-Commit-Position: refs/heads/master@{#437602}

Powered by Google App Engine
This is Rietveld 408576698