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

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

Issue 2026283002: [Findit] Adding logic to force try jobs regardless of bailout or previous results (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Addressing comments and rebase 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
« no previous file with comments | « appengine/findit/handlers/test/build_failure_test.py ('k') | appengine/findit/templates/build_failure.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/handlers/test/handlers_util_test.py
diff --git a/appengine/findit/handlers/test/handlers_util_test.py b/appengine/findit/handlers/test/handlers_util_test.py
index 2e692c511ba2d930a527957928f900f4fb1b39bb..2e49000cd126db6713313baa43ca977285e7ac8c 100644
--- a/appengine/findit/handlers/test/handlers_util_test.py
+++ b/appengine/findit/handlers/test/handlers_util_test.py
@@ -550,6 +550,35 @@ class HandlersUtilResultTest(wf_testcase.WaterfallTestCase):
}
self.assertEqual(expected_result, result)
+ def testGetAllTryJobResultsForTestNonSwarmingForcedTryJob(self):
+ tasks_info = {
+ 'step1': {
+ 'swarming_tasks': {
+ 'm/b/119': {
+ 'task_info': {
+ 'status': result_status.NON_SWARMING_NO_RERUN
+ },
+ 'all_tests': ['test1']
+ },
+ }
+ }
+ }
+ result = handlers_util._GetAllTryJobResultsForTest(
+ {'step1': 'm/b/119'}, tasks_info, True)
+
+ expected_result = {
+ 'step1': {
+ 'try_jobs': [
+ {
+ 'try_job_key': 'm/b/119',
+ 'ref_name': 'step1'
+ }
+ ]
+ }
+ }
+
+ self.assertEqual(expected_result, result)
+
def testGetAllTryJobResultsForTestNoSwarmingTaskInfo(self):
failure_result_map = {
'step1': {
@@ -923,7 +952,7 @@ class HandlersUtilResultTest(wf_testcase.WaterfallTestCase):
}
WfTryJob.Create('m', 'b', '119').put()
handlers_util._GetCulpritInfoForTryJobResultForTest(
- try_job_key, culprits_info)
+ try_job_key, culprits_info, False)
expected_culprits_info = {
'step1 on platform': {
@@ -963,7 +992,7 @@ class HandlersUtilResultTest(wf_testcase.WaterfallTestCase):
]
try_job.put()
handlers_util._GetCulpritInfoForTryJobResultForTest(
- try_job_key, culprits_info)
+ try_job_key, culprits_info, False)
expected_culprits_info = {
'step1 on platform': {
« no previous file with comments | « appengine/findit/handlers/test/build_failure_test.py ('k') | appengine/findit/templates/build_failure.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698