Merge lp:~bac/launchpad/bug-987898 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Gary Poster on 2012-05-02 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15191 |
| Proposed branch: | lp:~bac/launchpad/bug-987898 |
| Merge into: | lp:launchpad |
| Diff against target: |
223 lines (+36/-21) 3 files modified
lib/lp/bugs/tests/bugzilla-api-xmlrpc-transport.txt (+7/-7) lib/lp/bugs/tests/bugzilla-xmlrpc-transport.txt (+7/-6) lib/lp/bugs/tests/externalbugtracker.py (+22/-8) |
| To merge this branch: | bzr merge lp:~bac/launchpad/bug-987898 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Gary Poster (community) | 2012-05-02 | Approve on 2012-05-02 | |
|
Review via email:
|
|||
Commit Message
The use of mutable class data in a mock transport caused test isolation issues. Fix by copying class data to instance data in init.
Description of the Change
= Summary =
Test isolation error causes failure when tests are run out of order
and sample data is changed.
Normally the following tests are run in this order:
lib/lp/
lib/lp/
However, due to shuffling in the parallel test environment they may be
run in the opposite order which exposes an error.
bugzilla-
which is then queried by bugzilla-
results are now modified when the ordering changes.
== Proposed fix ==
To account for the tests being run in either order, the offending data
is wildcarded with ellipsis in the doctest.
== Pre-implementation notes ==
None
== Implementation details ==
As above.
== Tests ==
bin/test -vv --load-list tests.txt
Where tests.txt contains:
lib/lp/
lib/lp/
== Demo and Q/A ==
N/A
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
./lib/lp/
451: source exceeds 78 characters.
Will fix the lint.
| Gary Poster (gary) wrote : | # |
| Gary Poster (gary) wrote : | # |
Very nice!
(You communicated with me on IRC that the issue here was more complicated that a sample data -> factory change; what you've done here looks good in terms of adding better isolation.)

Brad and I talked. I have admittedly discouraged taking time on digging into some bugfixes, favoring doing the known right thing rather than digging into the underlying cause that makes the known right thing necessary (see bug 987903). However, in this case, switching from sample data to factories is a known better fix, and Brad says it should take a relatively small amount of time (less than a day) and that he is game to do so. I prefer that.