| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 from google.appengine.api import users | 5 from google.appengine.api import users |
| 6 | 6 |
| 7 import copy | 7 import copy |
| 8 | 8 |
| 9 from common.findit_testcase import FinditTestCase | 9 from common.findit_testcase import FinditTestCase |
| 10 from model.wf_config import FinditConfig | 10 from model.wf_config import FinditConfig |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 'cr_notification_build_threshold': 2, | 105 'cr_notification_build_threshold': 2, |
| 106 'cr_notification_latency_limit_minutes': 30, | 106 'cr_notification_latency_limit_minutes': 30, |
| 107 } | 107 } |
| 108 | 108 |
| 109 | 109 |
| 110 _DEFAULT_CHECK_FLAKE_SETTINGS = { | 110 _DEFAULT_CHECK_FLAKE_SETTINGS = { |
| 111 'lower_flake_threshold': 0.02, | 111 'lower_flake_threshold': 0.02, |
| 112 'upper_flake_threshold': 0.98, | 112 'upper_flake_threshold': 0.98, |
| 113 'max_flake_in_a_row': 4, | 113 'max_flake_in_a_row': 4, |
| 114 'max_stable_in_a_row': 4, | 114 'max_stable_in_a_row': 4, |
| 115 'iterations_to_rerun': 100 | 115 'iterations_to_rerun': 100, |
| 116 'max_build_numbers_to_look_back': 1000 |
| 116 } | 117 } |
| 117 | 118 |
| 118 | 119 |
| 119 DEFAULT_CONFIG_DATA = { | 120 DEFAULT_CONFIG_DATA = { |
| 120 'steps_for_masters_rules': _DEFAULT_STEPS_FOR_MASTERS_RULES, | 121 'steps_for_masters_rules': _DEFAULT_STEPS_FOR_MASTERS_RULES, |
| 121 'builders_to_trybots': _DEFAULT_TRY_BOT_MAPPING, | 122 'builders_to_trybots': _DEFAULT_TRY_BOT_MAPPING, |
| 122 'try_job_settings': _DEFAULT_TRY_JOB_SETTINGS, | 123 'try_job_settings': _DEFAULT_TRY_JOB_SETTINGS, |
| 123 'swarming_settings': _DEFAULT_SWARMING_SETTINGS, | 124 'swarming_settings': _DEFAULT_SWARMING_SETTINGS, |
| 124 'download_build_data_settings': _DEFAULT_DOWNLOAD_BUILD_DATA_SETTINGS, | 125 'download_build_data_settings': _DEFAULT_DOWNLOAD_BUILD_DATA_SETTINGS, |
| 125 'action_settings': _DEFAULT_ACTION_SETTINGS, | 126 'action_settings': _DEFAULT_ACTION_SETTINGS, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 142 if config_property and override_data: | 143 if config_property and override_data: |
| 143 config_data = copy.deepcopy(DEFAULT_CONFIG_DATA) | 144 config_data = copy.deepcopy(DEFAULT_CONFIG_DATA) |
| 144 config_data[config_property].update(override_data) | 145 config_data[config_property].update(override_data) |
| 145 | 146 |
| 146 FinditConfig.Get().Update(users.User(email='admin@chromium.org'), True, | 147 FinditConfig.Get().Update(users.User(email='admin@chromium.org'), True, |
| 147 **config_data) | 148 **config_data) |
| 148 | 149 |
| 149 def setUp(self): | 150 def setUp(self): |
| 150 super(WaterfallTestCase, self).setUp() | 151 super(WaterfallTestCase, self).setUp() |
| 151 self.UpdateUnitTestConfigSettings() | 152 self.UpdateUnitTestConfigSettings() |
| OLD | NEW |