launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #03732
Trouble with Librarian and LP_PERSISTENT_TEST_SERVICES
-
To:
Launchpad Community Development Team <launchpad-dev@xxxxxxxxxxxxxxxxxxx>
-
From:
Jeroen Vermeulen <jtv@xxxxxxxxxxxxx>
-
Date:
Tue, 06 Jul 2010 10:44:14 +0200
-
User-agent:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4
Hi all,
As you may know you can speed up your local test runs immensely by setting
LP_PERSISTENT_TEST_SERVICES=1
somewhere, e.g. in your .bashrc. This keeps Librarian and memcached
running across test runs so that you don't have to wait for those layers
to set up every time you want to run a test.
It turns out there's one risk though. After an unexpected system
shutdown, my Librarian consistently failed to start up. Whenever test
runs tried to set up LaunchpadFunctionalLayer, I got a traceback ending
with:
LayerIsolationError: Librarian has been killed or has hung.Tests should
use LibrarianLayer.hide() and LibrarianLayer.reveal() where possible,
and ensure the Librarian is restarted if it absolutely must be shutdown:
[Errno socket error] (111, 'Connection refused')
( Full traceback at http://paste.ubuntu.com/459509/ )
None of the usual tricks help: make clean, make, make schema,
rocketfuel-get, rocketfuel-setup, fresh branch, cleaning out /var/tmp,
reboots and so on.
What *did* fix the problem was to run the same tests again but without
LP_PERSISTENT_TEST_SERVICES set. That brings the librarian back into a
usable state and you can go right back to using persistent test services.
Jeroen
Follow ups