Dirtied resources are recreated even if they won't be needed again
Bug #271257 reported by
James Henstridge
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
testresources |
Fix Released
|
Medium
|
Jonathan Lange |
Bug Description
If we have a test inside an OptimisingTestSuite that requires a resource but dirties it, the finishedWith() call in the test's tear down will clean the resource and create a new one (since the use count is greater than zero). If there are no more tests that require the resource, OptimisingTestSuite will call finishedWith() again right after cleaning the newly created resource without it ever being used.
This doesn't result in incorrect behaviour, but is wasted effort (which should probably be considered a bug since the whole idea of testresources is to remove unnecessary setup/teardown of resources).
Related branches
lp:~jml/testresources/dirtied-bug-271257
- Robert Collins: Pending requested
lp:~lifeless/testresources/trunk
(Merged)
Changed in testresources: | |
assignee: | nobody → jml |
status: | New → Confirmed |
Changed in testresources: | |
importance: | Undecided → Medium |
status: | Confirmed → Triaged |
Changed in testresources: | |
status: | Triaged → Fix Committed |
Changed in testresources: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
Can you please try with jml's approved [but not merged yet, mea culpa]
branch; this changes a few things, and you probably want to adjust for
it anyhow, if it has the problem we'll confirm this bug.
-Rob