| OLD | NEW |
| 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 time | 5 import time |
| 6 | 6 |
| 7 from testing_utils import testing | 7 from testing_utils import testing |
| 8 | 8 |
| 9 from model import wf_analysis_status | 9 from model import wf_analysis_status |
| 10 from model.wf_swarming_task import WfSwarmingTask | 10 from model.wf_swarming_task import WfSwarmingTask |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 '--gtest_filter=a.b:a.c'], | 154 '--gtest_filter=a.b:a.c'], |
| 155 'grace_period_secs': 30, | 155 'grace_period_secs': 30, |
| 156 'idempotent': False, | 156 'idempotent': False, |
| 157 'inputs_ref': {'a': 1}, | 157 'inputs_ref': {'a': 1}, |
| 158 'io_timeout_secs': 1200, | 158 'io_timeout_secs': 1200, |
| 159 }, | 159 }, |
| 160 'tags': ['purpose:deflake', 'ref_master:%s' % master_name, | 160 'tags': ['purpose:deflake', 'ref_master:%s' % master_name, |
| 161 'ref_buildername:%s' % builder_name, | 161 'ref_buildername:%s' % builder_name, |
| 162 'ref_buildnumber:%s' % build_number, | 162 'ref_buildnumber:%s' % build_number, |
| 163 'ref_stepname:%s' % step_name, | 163 'ref_stepname:%s' % step_name, |
| 164 'ref_task_id:1'], | 164 'ref_task_id:1', |
| 165 'ref_name:%s' % step_name], |
| 165 'user': '', | 166 'user': '', |
| 166 } | 167 } |
| 167 | 168 |
| 168 pipeline = TriggerSwarmingTaskPipeline() | 169 pipeline = TriggerSwarmingTaskPipeline() |
| 169 new_task_id = pipeline.run( | 170 new_task_id = pipeline.run( |
| 170 master_name, builder_name, build_number, step_name, tests) | 171 master_name, builder_name, build_number, step_name, tests) |
| 171 self.assertEqual('new_task_id', new_task_id) | 172 self.assertEqual('new_task_id', new_task_id) |
| 172 self.assertEqual(expected_new_request_json, new_request_json) | 173 self.assertEqual(expected_new_request_json, new_request_json) |
| 173 | 174 |
| 174 swarming_task = WfSwarmingTask.Get( | 175 swarming_task = WfSwarmingTask.Get( |
| 175 master_name, builder_name, build_number, step_name) | 176 master_name, builder_name, build_number, step_name) |
| 176 self.assertIsNotNone(swarming_task) | 177 self.assertIsNotNone(swarming_task) |
| 177 self.assertEqual('new_task_id', swarming_task.task_id) | 178 self.assertEqual('new_task_id', swarming_task.task_id) |
| 178 self.assertEqual(tests, swarming_task.parameters['tests']) | 179 self.assertEqual(tests, swarming_task.parameters['tests']) |
| 179 self.assertEqual(_MOCK_SWARMING_SETTINGS['iterations_to_rerun'], | 180 self.assertEqual(_MOCK_SWARMING_SETTINGS['iterations_to_rerun'], |
| 180 swarming_task.parameters['iterations_to_rerun']) | 181 swarming_task.parameters['iterations_to_rerun']) |
| OLD | NEW |