spurious test failures regarding LPModerate and XMLRPCRunner

Bug #683486 reported by Martin Pool on 2010-12-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Undecided
Martin Pool

Bug Description

Running './bin/test -t mail' in a recent branch of Launchpad produces the following spurious failures:

https://lists.launchpad.net/launchpad-dev/msg05846.html

mbp@lp-lucid% ./bin/test -t incoming
Test-module import failures:

Module: lp.services.mailman.tests.test_lpmoderate

Traceback (most recent call last):
  File "/home/mbp/launchpad/lp-branches/work/lib/lp/scripts/utilities/importfascist.py", line 190, in import_fascist
    module = original_import(name, globals, locals, fromlist, level)
  File "/home/mbp/launchpad/lp-branches/work/lib/lp/services/mailman/tests/test_lpmoderate.py", line 9, in <module>
    from Mailman.Handlers import LPModerate
ImportError: cannot import name LPModerate

Module: lp.services.mailman.tests.test_mailman

Traceback (most recent call last):
  File "/home/mbp/launchpad/lp-branches/work/lib/lp/scripts/utilities/importfascist.py", line 190, in import_fascist
    module = original_import(name, globals, locals, fromlist, level)
  File "/home/mbp/launchpad/lp-branches/work/lib/lp/services/mailman/tests/test_mailman.py", line 28, in <module>
    from lp.services.mailman.testing import helpers
  File "/home/mbp/launchpad/lp-branches/work/lib/lp/scripts/utilities/importfascist.py", line 190, in import_fascist
    module = original_import(name, globals, locals, fromlist, level)
  File "/home/mbp/launchpad/lp-branches/work/lib/lp/services/mailman/testing/__init__.py", line 19, in <module>
    from Mailman.Queue import XMLRPCRunner
ImportError: cannot import name XMLRPCRunner

This made me miss some other actually important failures in testing lp:~mbp/launchpad/dkim

Related branches

Martin Pool (mbp) wrote :

The problem seems to be that lp.services.mailman.monkeypatches.monkey_patch() has not been run. Despite the name, this doesn't monkey patch in the usual Python sense by tweaking in-memory structures, but rather it patches a mailman source tree.

This is called by ./buildmailman.py and also lp/services/mailman/runmailman.py. I guess my tree should have had the former run, but it has not.

I think the reason behind _that_ may be that 'make compile' has some declared dependencies but they may not be enough to make sure it runs. I wonder how I ever got a mailman tree that wasn't patched though.

Martin Pool (mbp) wrote :

No, even when buildmailman runs the same problems occur.

affects: launchpad → launchpad-registry
Martin Pool (mbp) on 2010-12-02
tags: added: qa-untestable

Fixed in stable r12118 (http://bazaar.launchpad.net/~launchpad-pqm/launchpad/stable/revision/12118) by a commit, but not testable.

Changed in launchpad:
status: In Progress → Fix Committed
Curtis Hovey (sinzui) on 2010-12-23
Changed in launchpad:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui) on 2011-01-11
Changed in launchpad:
milestone: none → 11.01
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers