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

Unified Diff: tools/telemetry/telemetry/cros_interface_unittest.py

Issue 11348217: [telemetry] Removing flake in wpr_server.py caused by static port assignment from chrome/test/funct… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/cros_interface_unittest.py
diff --git a/tools/telemetry/telemetry/cros_interface_unittest.py b/tools/telemetry/telemetry/cros_interface_unittest.py
index 4609b651bc8c97557768fef71c632e82b54ca653..2ba47c1346ea4957801a717674876a8c5c32eefd 100644
--- a/tools/telemetry/telemetry/cros_interface_unittest.py
+++ b/tools/telemetry/telemetry/cros_interface_unittest.py
@@ -146,3 +146,17 @@ class CrOSInterfaceTest(unittest.TestCase):
# Device should no longer be able to connect to remote_port since it is no
# longer in use.
self.assertFalse(cri.IsHTTPServerRunningOnPort(remote_port))
+
+ @run_tests.RequiresBrowserOfType('cros-chrome')
+ def testGetRemotePortReservedPorts(self):
+ remote = options_for_unittests.Get().cros_remote
+ cri = cros_interface.CrOSInterface(
+ remote,
+ options_for_unittests.Get().cros_ssh_identity)
+
+ # Should return 2 separate ports even though the first one isn't technically
+ # being used yet.
+ remote_port_1 = cri.GetRemotePort()
+ remote_port_2 = cri.GetRemotePort()
+
+ self.assertTrue(remote_port_1 != remote_port_2)

Powered by Google App Engine
This is Rietveld 408576698