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

Issue 127143003: [chromedriver] Reuse forwarded adb ports. (Closed)

Created:
6 years, 11 months ago by frankf
Modified:
6 years, 11 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, chrisgao (Use stgao instead), frankf
Visibility:
Public.

Description

[chromedriver] Reuse forwarded adb ports. adb forward --remove is not available in older adb binaries; to avoid leaks, maintain a pool of previously forwarded ports. BUG=None Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243830

Patch Set 1 #

Total comments: 7

Patch Set 2 : #

Total comments: 6

Patch Set 3 : Addressed nits #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -30 lines) Patch
M chrome/test/chromedriver/chrome_launcher.cc View 1 5 chunks +16 lines, -9 lines 0 comments Download
M chrome/test/chromedriver/net/port_server.h View 1 1 chunk +8 lines, -2 lines 0 comments Download
M chrome/test/chromedriver/net/port_server.cc View 1 2 2 chunks +48 lines, -14 lines 2 comments Download
M chrome/test/chromedriver/net/port_server_unittest.cc View 1 2 2 chunks +17 lines, -1 line 0 comments Download
M chrome/test/chromedriver/session_commands.cc View 1 1 chunk +4 lines, -1 line 0 comments Download
M chrome/test/chromedriver/test/run_py_tests.py View 4 chunks +16 lines, -3 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
frankf
6 years, 11 months ago (2014-01-08 00:44:54 UTC) #1
craigdh
https://codereview.chromium.org/127143003/diff/1/chrome/test/chromedriver/chrome/adb_impl.cc File chrome/test/chromedriver/chrome/adb_impl.cc (left): https://codereview.chromium.org/127143003/diff/1/chrome/test/chromedriver/chrome/adb_impl.cc#oldcode110 chrome/test/chromedriver/chrome/adb_impl.cc:110: if (response == "OKAY") I don't think we should ...
6 years, 11 months ago (2014-01-08 20:56:33 UTC) #2
frankf
ptal https://codereview.chromium.org/127143003/diff/1/chrome/test/chromedriver/chrome/adb_impl.cc File chrome/test/chromedriver/chrome/adb_impl.cc (left): https://codereview.chromium.org/127143003/diff/1/chrome/test/chromedriver/chrome/adb_impl.cc#oldcode110 chrome/test/chromedriver/chrome/adb_impl.cc:110: if (response == "OKAY") On 2014/01/08 20:56:33, craigdh ...
6 years, 11 months ago (2014-01-08 21:57:24 UTC) #3
craigdh
lgtm w/ nits https://codereview.chromium.org/127143003/diff/80001/chrome/test/chromedriver/net/port_server.cc File chrome/test/chromedriver/net/port_server.cc (right): https://codereview.chromium.org/127143003/diff/80001/chrome/test/chromedriver/net/port_server.cc#newcode178 chrome/test/chromedriver/net/port_server.cc:178: port_to_use), nit: shouldn't this line be ...
6 years, 11 months ago (2014-01-09 01:45:05 UTC) #4
frankf
https://codereview.chromium.org/127143003/diff/80001/chrome/test/chromedriver/net/port_server.cc File chrome/test/chromedriver/net/port_server.cc (right): https://codereview.chromium.org/127143003/diff/80001/chrome/test/chromedriver/net/port_server.cc#newcode178 chrome/test/chromedriver/net/port_server.cc:178: port_to_use), On 2014/01/09 01:45:06, craigdh wrote: > nit: shouldn't ...
6 years, 11 months ago (2014-01-09 01:55:18 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/frankf@chromium.org/127143003/130001
6 years, 11 months ago (2014-01-09 01:57:25 UTC) #6
commit-bot: I haz the power
Change committed as 243830
6 years, 11 months ago (2014-01-09 10:26:16 UTC) #7
chrisgao (Use stgao instead)
6 years, 11 months ago (2014-01-14 02:11:46 UTC) #8
Message was sent while issue was closed.
lgtm with nits.

Sorry for the late review.

https://codereview.chromium.org/127143003/diff/130001/chrome/test/chromedrive...
File chrome/test/chromedriver/net/port_server.cc (right):

https://codereview.chromium.org/127143003/diff/130001/chrome/test/chromedrive...
chrome/test/chromedriver/net/port_server.cc:154: if (taken_.count(try_port))
Maybe it is good to add a comment in port_server.h saying |lock_| should be held
before calling PortManager::FindAvailablePort?

https://codereview.chromium.org/127143003/diff/130001/chrome/test/chromedrive...
chrome/test/chromedriver/net/port_server.cc:155: continue;
In a corner case, chromedriver is used to test on both desktop version and
android version.
For the desktop version, if |try_port| is in |unused_forwarded_port_|, we could
assume it is used by adb and skip it too?

Powered by Google App Engine
This is Rietveld 408576698