| Index: appengine/findit/handlers/test/config_test.py
|
| diff --git a/appengine/findit/handlers/test/config_test.py b/appengine/findit/handlers/test/config_test.py
|
| index c5f6cc083ebceddddc61323a43370bfba5f58fbb..2b9f1e316f6a913bf4209d52a8748c36525624e0 100644
|
| --- a/appengine/findit/handlers/test/config_test.py
|
| +++ b/appengine/findit/handlers/test/config_test.py
|
| @@ -88,7 +88,8 @@ _MOCK_CHECK_FLAKE_SETTINGS = {
|
| 'upper_flake_threshold': 0.98,
|
| 'max_flake_in_a_row': 4,
|
| 'max_stable_in_a_row': 4,
|
| - 'iterations_to_rerun': 100
|
| + 'iterations_to_rerun': 100,
|
| + 'max_build_numbers_to_look_back': 1000
|
| }
|
|
|
| _MOCK_VERSION_NUMBER = 12
|
| @@ -769,7 +770,8 @@ class ConfigTest(testing.AppengineTestCase):
|
| 'upper_flake_threshold': 0.98,
|
| 'max_flake_in_a_row': 4,
|
| 'max_stable_in_a_row': 4,
|
| - 'iterations_to_rerun': 100
|
| + 'iterations_to_rerun': 100,
|
| + 'max_build_numbers_to_look_back': 1000
|
| }))
|
| self.assertFalse(config._ValidateCheckFlakeSettings(
|
| {
|
| @@ -777,7 +779,8 @@ class ConfigTest(testing.AppengineTestCase):
|
| 'upper_flake_threshold': 'a', # Should be a float.
|
| 'max_flake_in_a_row': 4,
|
| 'max_stable_in_a_row': 4,
|
| - 'iterations_to_rerun': 100
|
| + 'iterations_to_rerun': 100,
|
| + 'max_build_numbers_to_look_back': 1000
|
| }))
|
| self.assertFalse(config._ValidateCheckFlakeSettings(
|
| {
|
| @@ -785,7 +788,8 @@ class ConfigTest(testing.AppengineTestCase):
|
| 'upper_flake_threshold': 0.98,
|
| 'max_flake_in_a_row': [], # Should be an int.
|
| 'max_stable_in_a_row': 4,
|
| - 'iterations_to_rerun': 100
|
| + 'iterations_to_rerun': 100,
|
| + 'max_build_numbers_to_look_back': 1000
|
| }))
|
| self.assertFalse(config._ValidateCheckFlakeSettings(
|
| {
|
| @@ -793,7 +797,8 @@ class ConfigTest(testing.AppengineTestCase):
|
| 'upper_flake_threshold': 0.98,
|
| 'max_flake_in_a_row': 4,
|
| 'max_stable_in_a_row': {}, # Should be an int.
|
| - 'iterations_to_rerun': 100
|
| + 'iterations_to_rerun': 100,
|
| + 'max_build_numbers_to_look_back': 1000
|
| }))
|
| self.assertFalse(config._ValidateCheckFlakeSettings(
|
| {
|
| @@ -801,7 +806,17 @@ class ConfigTest(testing.AppengineTestCase):
|
| 'upper_flake_threshold': 0.98,
|
| 'max_flake_in_a_row': 4,
|
| 'max_stable_in_a_row': 4,
|
| - 'iterations_to_rerun': 3.2 # Should be an int.
|
| + 'iterations_to_rerun': 3.2, # Should be an int.
|
| + 'max_build_numbers_to_look_back': 1000
|
| + }))
|
| + self.assertFalse(config._ValidateCheckFlakeSettings(
|
| + {
|
| + 'lower_flake_threshold': 0.02,
|
| + 'upper_flake_threshold': 0.98,
|
| + 'max_flake_in_a_row': 4,
|
| + 'max_stable_in_a_row': 4,
|
| + 'iterations_to_rerun': 4,
|
| + 'max_build_numbers_to_look_back': 'a' # Should be an int.
|
| }))
|
| self.assertTrue(config._ValidateCheckFlakeSettings(
|
| {
|
| @@ -809,5 +824,6 @@ class ConfigTest(testing.AppengineTestCase):
|
| 'upper_flake_threshold': 0.98,
|
| 'max_flake_in_a_row': 4,
|
| 'max_stable_in_a_row': 4,
|
| - 'iterations_to_rerun': 100
|
| + 'iterations_to_rerun': 100,
|
| + 'max_build_numbers_to_look_back': 1000
|
| }))
|
|
|