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

Unified Diff: telemetry/telemetry/internal/util/ts_proxy_server.py

Issue 2453073002: [Telemetry] Move from telemetry WaitFor to py_utils WaitFor (Closed)
Patch Set: [Telemetry] Move from telemetry WaitFor to py_utils WaitFor Created 4 years, 2 months 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 | « telemetry/telemetry/internal/story_runner.py ('k') | telemetry/telemetry/internal/util/wpr_server.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/util/ts_proxy_server.py
diff --git a/telemetry/telemetry/internal/util/ts_proxy_server.py b/telemetry/telemetry/internal/util/ts_proxy_server.py
index abedfcc868781fd3b2a1ef857720d1b9e888568a..d99a95c26342e458e238944c9492fe624f09e4c6 100644
--- a/telemetry/telemetry/internal/util/ts_proxy_server.py
+++ b/telemetry/telemetry/internal/util/ts_proxy_server.py
@@ -10,10 +10,11 @@ import re
import subprocess
import sys
-from telemetry.core import exceptions
from telemetry.core import util
from telemetry.internal.util import atexit_with_log
+import py_utils
+
_TSPROXY_PATH = os.path.join(
util.GetTelemetryThirdPartyDir(), 'tsproxy', 'tsproxy.py')
@@ -69,10 +70,10 @@ class TsProxyServer(object):
stderr=subprocess.PIPE, bufsize=1)
atexit_with_log.Register(self.StopServer)
try:
- util.WaitFor(self._IsStarted, timeout)
+ py_utils.WaitFor(self._IsStarted, timeout)
logging.info('TsProxy port: %s', self._port)
self._is_running = True
- except exceptions.TimeoutException:
+ except py_utils.TimeoutException:
err = self.StopServer()
raise RuntimeError(
'Error starting tsproxy: %s' % err)
@@ -98,7 +99,7 @@ class TsProxyServer(object):
command_output.append(self._proc.stdout.readline().strip())
return (
command_output[-1] == 'OK' or command_output[-1] == 'ERROR')
- util.WaitFor(CommandStatusIsRead, timeout)
+ py_utils.WaitFor(CommandStatusIsRead, timeout)
if not 'OK' in command_output:
raise RuntimeError('Failed to execute command %s:\n%s' %
(repr(command_string), '\n'.join(command_output)))
« no previous file with comments | « telemetry/telemetry/internal/story_runner.py ('k') | telemetry/telemetry/internal/util/wpr_server.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698