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

Issue 294893004: Telemetry: Mock out subprocess in VTune profiler unit test. (Closed)

Created:
6 years, 7 months ago by Dominik Grewe
Modified:
6 years, 7 months ago
Reviewers:
tonyg, Sami
CC:
chromium-reviews, telemetry+watch_chromium.org
Visibility:
Public.

Description

Telemetry: Mock out subprocess in VTune profiler unit test. Instead of using simple_mock.MockObject for mocking out subprocess, this CL introduces a MockSubprocess class which is more flexible in handling calls. This way we can avoid the problem of having to know in advance how many calls the profiler will make to subprocess. BUG=375231 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272023

Patch Set 1 #

Patch Set 2 : Mock out subprocess instead of profiler #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -26 lines) Patch
M tools/telemetry/telemetry/core/platform/profiler/vtune_profiler_unittest.py View 1 3 chunks +44 lines, -26 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Dominik Grewe
Ptal. This is different from what I had originally suggested on the bug, but it ...
6 years, 7 months ago (2014-05-20 15:46:43 UTC) #1
tonyg
Rather than mock out the code under test, can we also fix this by instead ...
6 years, 7 months ago (2014-05-21 08:45:00 UTC) #2
Dominik Grewe
On 2014/05/21 08:45:00, tonyg wrote: > Rather than mock out the code under test, can ...
6 years, 7 months ago (2014-05-21 08:50:49 UTC) #3
tonyg
lgtm I think I understand the rationale now.
6 years, 7 months ago (2014-05-21 09:30:41 UTC) #4
Dominik Grewe
Having discussed this with Sami we came up with a cleaner implementation: by having a ...
6 years, 7 months ago (2014-05-21 10:57:29 UTC) #5
Sami
Thanks, lgtm! Looks pretty straightforward now.
6 years, 7 months ago (2014-05-21 11:15:47 UTC) #6
tonyg
lgtm Much better!
6 years, 7 months ago (2014-05-21 11:15:56 UTC) #7
Dominik Grewe
The CQ bit was checked by dominikg@chromium.org
6 years, 7 months ago (2014-05-21 11:23:24 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dominikg@chromium.org/294893004/40001
6 years, 7 months ago (2014-05-21 11:25:38 UTC) #9
commit-bot: I haz the power
6 years, 7 months ago (2014-05-21 23:52:42 UTC) #10
Message was sent while issue was closed.
Change committed as 272023

Powered by Google App Engine
This is Rietveld 408576698