LayerDatabasePolicyTestCase shouldn't use DummyConfiguration

Bug #397299 reported by James Henstridge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Francis J. Lacoste

Bug Description

When running "bin/test -vvm canonical.launchpad.webapp" in devel r8802, I got a failure in test_getPrincipal_for_person_and_account_with_different_ids (from test_publication) in looking up the IWebServiceConfiguration utility.

If instead I run the following, everything passes:

bin/test -vvm canonical.launchpad.webapp -t '!(LayerDatabasePolicyTestCase|TestVhostWebserviceFactory|TestWebServiceRequestTraversal)'

The tests excluded in this second run all subclass from DummyConfigurationTestCase, whose tearDown() unregisters the IWebServiceConfiguration utility. I suspect that this doesn't trigger in a full test suite run due to the test runner re-executing itself at a layer change before the problem tests.

Revision history for this message
Francis J. Lacoste (flacoste) wrote :

I think this is a layer problem. Tests using the DummyConfigurationTestCase should not use any layer I think. Otherwise, they will overwrite the normal web service configuration used in Launchpad.

Changed in launchpad-foundations:
assignee: nobody → Leonard Richardson (leonardr)
importance: Undecided → High
milestone: none → 2.2.7
status: New → Triaged
Changed in launchpad-foundations:
assignee: Leonard Richardson (leonardr) → Francis J. Lacoste (flacoste)
status: Triaged → In Progress
summary: - DummyConfigurationTestCase does not tear down correctly.
+ LayerDatabasePolicyTestCase shouldn't use DummyConfiguration
Changed in launchpad-foundations:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.