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

Unified Diff: chrome/test/functional/webpagereplay.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
« no previous file with comments | « no previous file | tools/telemetry/telemetry/adb_commands.py » ('j') | tools/telemetry/telemetry/wpr_server.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/webpagereplay.py
diff --git a/chrome/test/functional/webpagereplay.py b/chrome/test/functional/webpagereplay.py
index c6d3350c7b3d828f935de6f9f0d4e9d91b45fbba..22b06e84a323104c6071774ab992c648295c7de1 100755
--- a/chrome/test/functional/webpagereplay.py
+++ b/chrome/test/functional/webpagereplay.py
@@ -13,14 +13,22 @@ Of the public module names, the following ones are key:
import logging
import os
import signal
+import socket
import subprocess
import sys
import time
import urllib
+def GetRandomOpenPort():
bulach 2012/11/26 13:53:46 drive-by: can we re-use / improve this? http://src
+ tmp = socket.socket()
+ tmp.bind(('', 0))
+ port = tmp.getsockname()[1]
+ tmp.close()
-HTTP_PORT = 8080
-HTTPS_PORT = 8413
+ return port
+
+HTTP_PORT = GetRandomOpenPort()
+HTTPS_PORT = GetRandomOpenPort()
REPLAY_HOST='127.0.0.1'
CHROME_FLAGS = [
'--host-resolver-rules=MAP * %s,EXCLUDE localhost' % REPLAY_HOST,
« no previous file with comments | « no previous file | tools/telemetry/telemetry/adb_commands.py » ('j') | tools/telemetry/telemetry/wpr_server.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698