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

Unified Diff: appengine/findit/handlers/test/config_test.py

Issue 2282093002: [Findit] Moving check flake max_builds_to_look_back to config (Closed)
Patch Set: Created 4 years, 4 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
« no previous file with comments | « appengine/findit/handlers/config.py ('k') | appengine/findit/waterfall/flake/initialize_flake_pipeline.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
}))
« no previous file with comments | « appengine/findit/handlers/config.py ('k') | appengine/findit/waterfall/flake/initialize_flake_pipeline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698