Merge lp:~lifeless/testresources/bug-284125 into lp:~testresources-developers/testresources/trunk
Proposed by
Robert Collins
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~lifeless/testresources/bug-284125 |
Merge into: | lp:~testresources-developers/testresources/trunk |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~lifeless/testresources/bug-284125 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Lange | Approve | ||
James Henstridge (community) | Needs Fixing | ||
testresources developers | Pending | ||
Review via email: mp+7543@code.launchpad.net |
To post a comment you must log in.
I'm not sure of the exact uses Jonathan had for this API, but this does not look like what I'd have expected.
To turn on tracing with this API, it looks like I'd have to look through the entire test suite to find out where all the resource manages get instantiated and change the constructors. I'd have expected something closer to slotting in a different TestResult implementation into the test runner: something that can be done in one place and affects all resources. I'm not sure about the best way to do this though.
Second, it would be better to pass the TestResource instance and event type to the tracer rather than a formatted string. This would make it easier to do things like collect statistics about resource use and give the tracer a choice about how to format things.
Lastly, it might be worth adding a trace point before and after making/cleaning a resource. That would allow using the tracer API to calculate how much time those tasks are taking per-run and overall.