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

Side by Side Diff: appengine/findit/waterfall/test/swarming_util_test.py

Issue 2547713002: [Findit] Using ts_mon to track swarming/isolated server outages (Closed)
Patch Set: fixing whitespace Created 4 years 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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import collections 5 import collections
6 import json 6 import json
7 import mock 7 import mock
8 import os 8 import os
9 import urllib 9 import urllib
10 import zlib 10 import zlib
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 'should_retry_server': True, 675 'should_retry_server': True,
676 'server_retry_timeout_hours': -1 676 'server_retry_timeout_hours': -1
677 } 677 }
678 self.UpdateUnitTestConfigSettings( 678 self.UpdateUnitTestConfigSettings(
679 'swarming_settings', override_swarming_settings) 679 'swarming_settings', override_swarming_settings)
680 content, error = swarming_util._SendRequestToServer('url', HttpClient()) 680 content, error = swarming_util._SendRequestToServer('url', HttpClient())
681 self.assertIsNone(content) 681 self.assertIsNone(content)
682 self.assertEqual( 682 self.assertEqual(
683 error['code'], swarming_util.URLFETCH_CONNECTION_CLOSED_ERROR) 683 error['code'], swarming_util.URLFETCH_CONNECTION_CLOSED_ERROR)
684 self.assertTrue(error['retry_timeout']) 684 self.assertTrue(error['retry_timeout'])
685
686 def testOnConnectionFailedSwarmingServer(self):
687 url = 'https://%s/_ah/api/swarming/v1/task/12345/result' % (
688 FinditConfig().Get().swarming_settings.get('server_host'))
689 swarming_util._OnConnectionFailed(url, DeadlineExceededError)
stgao 2016/12/01 23:03:59 I guess we don't need this test anymore? At least
lijeffrey 2016/12/01 23:25:30 Done.
OLDNEW
« appengine/findit/waterfall/swarming_util.py ('K') | « appengine/findit/waterfall/swarming_util.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698