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

Unified Diff: tools/push-to-trunk/test_scripts.py

Issue 91733003: Add retry feature for push-to-trunk script. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments. Created 7 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 | « tools/push-to-trunk/push_to_trunk.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/push-to-trunk/test_scripts.py
diff --git a/tools/push-to-trunk/test_scripts.py b/tools/push-to-trunk/test_scripts.py
index f4d0c126ce0fb052221e0618fba4decead97d693..acb28a097c70ec6f485521c979e5256feb64102e 100644
--- a/tools/push-to-trunk/test_scripts.py
+++ b/tools/push-to-trunk/test_scripts.py
@@ -216,7 +216,12 @@ class SimpleMock(object):
# callback for checking the context at the time of the call.
if len(expected_call) == len(args) + 2:
expected_call[len(args) + 1]()
- return expected_call[len(args)]
+ return_value = expected_call[len(args)]
+
+ # If the return value is an exception, raise it instead of returning.
+ if isinstance(return_value, Exception):
+ raise return_value
+ return return_value
def AssertFinished(self):
if self._index < len(self._recipe) -1:
@@ -269,6 +274,9 @@ class ScriptTest(unittest.TestCase):
def ReadURL(self, url):
return self._url_mock.Call(url)
+ def Sleep(self, seconds):
+ pass
+
def ExpectGit(self, *args):
"""Convenience wrapper."""
self._git_mock.Expect(*args)
@@ -674,6 +682,7 @@ class ScriptTest(unittest.TestCase):
os.environ["EDITOR"] = "vi"
self.ExpectReadURL([
+ ["https://v8-status.appspot.com/lkgr", Exception("Network problem")],
["https://v8-status.appspot.com/lkgr", "100"],
])
« no previous file with comments | « tools/push-to-trunk/push_to_trunk.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698