Merge lp:~wgrant/launchpad/fix-duplicate-harness-zcml into lp:launchpad
Proposed by
William Grant
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Abel Deuring | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~wgrant/launchpad/fix-duplicate-harness-zcml | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
12 lines (+0/-2) 1 file modified
lib/canonical/database/harness.py (+0/-2) |
||||
To merge this branch: | bzr merge lp:~wgrant/launchpad/fix-duplicate-harness-zcml | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | code | Approve | |
Review via email: mp+14464@code.launchpad.net |
To post a comment you must log in.
canonical. database. harness. _get_locals calls execute_ zcml_for_ scripts, then executes script.zcml itself. Unfortunately, execute_ zcml_for_ scripts executes script.zcml itself, so all the ZCML is loaded twice. This means that "make harness" has duplicate subscriber registrations, causing calls like factory.makeBug() to fail with unique constraint violations.
To fix this, I've removed the direct execution of script.zcml.
To QA, verify that factory.makeBug() works in "make harness".