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

Side by Side Diff: appengine/findit/waterfall/test/process_flake_swarming_task_result_pipeline_test.py

Issue 2312413002: [Findit] Record error if swarming task completes with exit_code as 2. (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import datetime 5 import datetime
6 6
7 from model import analysis_status 7 from model import analysis_status
8 from model.flake.flake_swarming_task import FlakeSwarmingTask 8 from model.flake.flake_swarming_task import FlakeSwarmingTask
9 from model.flake.master_flake_analysis import MasterFlakeAnalysis 9 from model.flake.master_flake_analysis import MasterFlakeAnalysis
10 from waterfall import swarming_util 10 from waterfall import swarming_util
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 99 }
100 } 100 }
101 101
102 102
103 class ProcessFlakeSwarmingTaskResultPipelineTest(wf_testcase.WaterfallTestCase): 103 class ProcessFlakeSwarmingTaskResultPipelineTest(wf_testcase.WaterfallTestCase):
104 104
105 def _MockedGetSwarmingTaskResultById(self, task_id, _): 105 def _MockedGetSwarmingTaskResultById(self, task_id, _):
106 swarming_task_results = { 106 swarming_task_results = {
107 'task_id1': { 107 'task_id1': {
108 'state': 'COMPLETED', 108 'state': 'COMPLETED',
109 'exit_code': '1',
109 'tags': [ 110 'tags': [
110 'priority:25', 111 'priority:25',
111 'ref_name:abc_tests' 112 'ref_name:abc_tests'
112 ], 113 ],
113 'outputs_ref': { 114 'outputs_ref': {
114 'isolatedserver': _ISOLATED_SERVER, 115 'isolatedserver': _ISOLATED_SERVER,
115 'namespace': 'default-gzip', 116 'namespace': 'default-gzip',
116 'isolated': 'shard1_isolated' 117 'isolated': 'shard1_isolated'
117 }, 118 },
118 'created_ts': '2016-02-10T18:32:06.538220', 119 'created_ts': '2016-02-10T18:32:06.538220',
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 self.build_number, self.step_name, 259 self.build_number, self.step_name,
259 'task_id1', self.build_number, self.test_name) 260 'task_id1', self.build_number, self.test_name)
260 self.assertEqual('abc_tests', task_info) 261 self.assertEqual('abc_tests', task_info)
261 self.assertEqual(self.step_name, step_name) 262 self.assertEqual(self.step_name, step_name)
262 263
263 task = FlakeSwarmingTask.Get( 264 task = FlakeSwarmingTask.Get(
264 self.master_name, self.builder_name, self.build_number, 265 self.master_name, self.builder_name, self.build_number,
265 self.step_name, self.test_name) 266 self.step_name, self.test_name)
266 self.assertEqual(analysis_status.ERROR, task.status) 267 self.assertEqual(analysis_status.ERROR, task.status)
267 self.assertEqual({}, task.tests_statuses) 268 self.assertEqual({}, task.tests_statuses)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698