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

Unified Diff: appengine/findit/waterfall/test/identify_try_job_culprit_pipeline_test.py

Issue 2075423002: [Findit] Group failures by culprit and send notification to codereview. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Clean up. Created 4 years, 6 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
Index: appengine/findit/waterfall/test/identify_try_job_culprit_pipeline_test.py
diff --git a/appengine/findit/waterfall/test/identify_try_job_culprit_pipeline_test.py b/appengine/findit/waterfall/test/identify_try_job_culprit_pipeline_test.py
index 79262a3edd817d73a1ab802096b9e3ac2c753d52..91eeaa7521c17665df6a130ef9c9a9dd33397ae2 100644
--- a/appengine/findit/waterfall/test/identify_try_job_culprit_pipeline_test.py
+++ b/appengine/findit/waterfall/test/identify_try_job_culprit_pipeline_test.py
@@ -930,3 +930,29 @@ class IdentifyTryJobCulpritPipelineTest(testing.AppengineTestCase):
self.assertEqual(culprit_map, expected_culprit_map)
self.assertEqual(failed_revisions, ['rev1'])
+
+ def testNotifyCulprits(self):
+ instances = []
+ class Mocked_SendNotificationForCulpritPipeline(object):
+ def __init__(self, *args):
+ self.args = args
+ self.started = False
+ instances.append(self)
+
+ def start(self):
+ self.started = True
+
+ self.mock(
+ identify_try_job_culprit_pipeline, 'SendNotificationForCulpritPipeline',
+ Mocked_SendNotificationForCulpritPipeline)
+
+ culprits = {
+ 'r1': {
+ 'repo_name': 'chromium',
+ 'revision': 'r1',
+ }
+ }
+
+ identify_try_job_culprit_pipeline._NotifyCulprits('m', 'b', 1, culprits)
+ self.assertEqual(1, len(instances))
+ self.assertTrue(instances[0].started)

Powered by Google App Engine
This is Rietveld 408576698