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

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

Issue 2290833002: [Findit] Fix a bug that MonitorTryJobPipeline still runs when no try job scheduled. (Closed)
Patch Set: removed unwanted code. 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
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 5ff5729df71521260e9d36ffb8644116684eb7e6..935388d3aa0a50e14e489497dad3bea1476224d0 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
@@ -956,3 +956,18 @@ class IdentifyTryJobCulpritPipelineTest(testing.AppengineTestCase):
identify_try_job_culprit_pipeline._NotifyCulprits('m', 'b', 1, culprits)
self.assertEqual(1, len(instances))
self.assertTrue(instances[0].started)
+
+ def testReturnNoneIfNoTryJob(self):
+ master_name = 'm'
+ builder_name = 'b'
+ build_number = 8
+
+ try_job = WfTryJob.Create(master_name, builder_name, build_number).put()
+ pipeline = IdentifyTryJobCulpritPipeline()
+ culprit = pipeline.run(master_name, builder_name, build_number, ['rev1'],
+ failure_type.TEST, None, None)
+ self.assertIsNone(culprit)
+
+ try_job = WfTryJob.Get(master_name, builder_name, build_number)
+ self.assertEqual(try_job.test_results, [])
+ self.assertEqual(try_job.status, analysis_status.COMPLETED)

Powered by Google App Engine
This is Rietveld 408576698