Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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.
| |
| OLD | NEW |