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

Unified Diff: infra/libs/buildbot/test/master_test.py

Issue 1116583002: Add connection breakage. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 5 years, 8 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
« infra/libs/buildbot/master.py ('K') | « infra/libs/buildbot/master.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/libs/buildbot/test/master_test.py
diff --git a/infra/libs/buildbot/test/master_test.py b/infra/libs/buildbot/test/master_test.py
index fa9072dd4c1e7c84b6f7e53245f7ceb30225e845..32140807396d89b2b7574e74075d2b0b425324af 100644
--- a/infra/libs/buildbot/test/master_test.py
+++ b/infra/libs/buildbot/test/master_test.py
@@ -147,7 +147,13 @@ class TestMasterInformation(auto_stub.TestCase):
def timeout(*_args, **_kwargs):
raise requests.exceptions.Timeout('timeout')
self.mock(requests, 'get', timeout)
- self.assertFalse(master.get_accepting_builds(self.chromium_fyi))
+ self.assertIsNone(master.get_accepting_builds(self.chromium_fyi))
+
+ def testConnectionErr(self):
+ def timeout(*_args, **_kwargs):
+ raise requests.exceptions.ConnectionError('error')
+ self.mock(requests, 'get', timeout)
+ self.assertIsNone(master.get_accepting_builds(self.chromium_fyi))
class TestMasterManipulation(auto_stub.TestCase):
def setUp(self):
« infra/libs/buildbot/master.py ('K') | « infra/libs/buildbot/master.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698