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

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

Issue 3001163002: Pinpoint - Surface info from executions for display in UI. (Closed)
Patch Set: Rebase again. Created 3 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 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_hashes': ('output isolate hash',)}) 111 {'isolate_hashes': ('output isolate hash',)})
112 self.assertEqual(
113 {
114 'bot_ids': ['bot id'],
115 'input_isolate_hash': 'input isolate hash',
116 'task_ids': ['task id'],
117 'result_arguments': {'isolate_hashes': ('output isolate hash',)},
118 'result_values': (None,),
119 },
120 execution.AsDict())
121
112 122
113 # Start a second Execution to check bot_id handling. We get a bot_id from 123 # 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. 124 # Swarming from the first Execution and reuse it in subsequent Executions.
115 execution = quest.Start('input isolate hash') 125 execution = quest.Start('input isolate hash')
116 execution.Poll() 126 execution.Poll()
117 127
118 self.assertNewTaskHasBotId(swarming_tasks_new) 128 self.assertNewTaskHasBotId(swarming_tasks_new)
119 129
120 130
121 @mock.patch('dashboard.services.swarming_service.Tasks.New') 131 @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', 224 'bot_id': 'bot id',
215 'exit_code': 0, 225 'exit_code': 0,
216 'failure': False, 226 'failure': False,
217 'outputs_ref': {'isolated': 'output isolate hash'}, 227 'outputs_ref': {'isolated': 'output isolate hash'},
218 'state': 'COMPLETED', 228 'state': 'COMPLETED',
219 } 229 }
220 execution_1.Poll() 230 execution_1.Poll()
221 execution_2.Poll() 231 execution_2.Poll()
222 232
223 self.assertEqual(swarming_tasks_new.call_count, 2) 233 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