Merge lp://qastaging/~allenap/maas/log-power-on-a-bit-later into lp://qastaging/~maas-committers/maas/trunk
Proposed by
Gavin Panella
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | no longer in the source branch. |
Merged at revision: | 3153 |
Proposed branch: | lp://qastaging/~allenap/maas/log-power-on-a-bit-later |
Merge into: | lp://qastaging/~maas-committers/maas/trunk |
Diff against target: |
104 lines (+25/-24) 2 files modified
src/provisioningserver/rpc/power.py (+3/-4) src/provisioningserver/rpc/tests/test_power.py (+22/-20) |
To merge this branch: | bzr merge lp://qastaging/~allenap/maas/log-power-on-a-bit-later |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | Approve | ||
Review via email: mp+236629@code.qastaging.launchpad.net |
Commit message
Only log the start of a power change in change_
Previously it was logged in maybe_change_
To post a comment you must log in.
The change itself makes sense, but I'm lost with the test.
Before I go into my main question with the test: when injecting unhandled exceptions, I'd recommend creating an ad-hoc exception class over just picking an existing exception class. Otherwise the reader is left wondering if your choice of exception has any significance. For a while I was wondering why you seemed to be saying that division was difficult, and I still don't see what you mean by “This doesn't get any easier”!
But now the main thing. How does the test establish that power_change_ starting is called “first”? I don't see anything to prove that anything else doesn't happen before the exception. That must have been the purpose of the cheating that your comment mentions, so did you forget a check?