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

Side by Side Diff: dashboard/dashboard/pinpoint/models/quest/run_test_test.py

Issue 3000303002: [pinpoint] Support multiple Swarming tasks. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « dashboard/dashboard/pinpoint/models/quest/run_test.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 unittest 5 import unittest
6 6
7 import mock 7 import mock
8 8
9 from dashboard.pinpoint.models.quest import run_test 9 from dashboard.pinpoint.models.quest import run_test
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 'failure': False, 101 'failure': False,
102 'outputs_ref': {'isolated': 'output isolate hash'}, 102 'outputs_ref': {'isolated': 'output isolate hash'},
103 'state': 'COMPLETED', 103 'state': 'COMPLETED',
104 } 104 }
105 execution.Poll() 105 execution.Poll()
106 106
107 self.assertTrue(execution.completed) 107 self.assertTrue(execution.completed)
108 self.assertFalse(execution.failed) 108 self.assertFalse(execution.failed)
109 self.assertEqual(execution.result_values, (None,)) 109 self.assertEqual(execution.result_values, (None,))
110 self.assertEqual(execution.result_arguments, 110 self.assertEqual(execution.result_arguments,
111 {'isolate_hash': 'output isolate hash'}) 111 {'isolate_hashes': ('output isolate hash',)})
112 112
113 # Start a second Execution to check bot_id handling. We get a bot_id from 113 # Start a second Execution to check bot_id handling. We get a bot_id from
114 # Swarming from the first Execution and reuse it in subsequent Executions. 114 # Swarming from the first Execution and reuse it in subsequent Executions.
115 execution = quest.Start('input isolate hash') 115 execution = quest.Start('input isolate hash')
116 execution.Poll() 116 execution.Poll()
117 117
118 self.assertNewTaskHasBotId(swarming_tasks_new) 118 self.assertNewTaskHasBotId(swarming_tasks_new)
119 119
120 120
121 @mock.patch('dashboard.services.swarming_service.Tasks.New') 121 @mock.patch('dashboard.services.swarming_service.Tasks.New')
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 'bot_id': 'bot id', 214 'bot_id': 'bot id',
215 'exit_code': 0, 215 'exit_code': 0,
216 'failure': False, 216 'failure': False,
217 'outputs_ref': {'isolated': 'output isolate hash'}, 217 'outputs_ref': {'isolated': 'output isolate hash'},
218 'state': 'COMPLETED', 218 'state': 'COMPLETED',
219 } 219 }
220 execution_1.Poll() 220 execution_1.Poll()
221 execution_2.Poll() 221 execution_2.Poll()
222 222
223 self.assertEqual(swarming_tasks_new.call_count, 2) 223 self.assertEqual(swarming_tasks_new.call_count, 2)
OLDNEW
« no previous file with comments | « dashboard/dashboard/pinpoint/models/quest/run_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698