← Back to team overview

launchpad-dev team mailing list archive

LayerIsolationError

 

Is anyone else getting LayerIsolationErrors when running tests on your
local machine? I am getting this error with the devel and db-devel
branches when I run a test that uses LaunchpadScriptLayer or above. In
LaunchpadScriptLayer.tearDown(), it calls tearDownHelper, which
explicitly tears down the librarian. Then, when the testrunner tries
to tear down the LibrarianLayer, it fails because the pidfile no
longer exists.

-Edwin

$ ./bin/test -vvt 'test_distributionsourcepackage.*test_order'
Running tests at level 1
Running canonical.testing.layers.LaunchpadZopelessLayer tests:
  Set up canonical.testing.layers.BaseLayer in 0.001 seconds.
  Set up canonical.testing.layers.ZopelessLayer in 3.895 seconds.
  Set up canonical.testing.layers.DatabaseLayer in 0.301 seconds.
  Set up canonical.testing.layers.LibrarianLayer in 6.623 seconds.
  Set up canonical.testing.layers.MemcachedLayer in 0.122 seconds.
  Set up canonical.testing.layers.LaunchpadLayer in 0.000 seconds.
  Set up canonical.testing.layers.LaunchpadScriptLayer in 0.009 seconds.
  Set up canonical.testing.layers.LaunchpadZopelessLayer in 0.000 seconds.
  Running:
 lp.registry.tests.test_distributionsourcepackage.TestDistributionSourcePackageFindRelatedArchives.test_order_by_soyuz_package_karma
  Ran 1 tests with 0 failures and 0 errors in 1.196 seconds.
Tearing down left over layers:
  Tear down canonical.testing.layers.LaunchpadZopelessLayer in 0.000 seconds.
  Tear down canonical.testing.layers.LaunchpadScriptLayer in 0.126 seconds.
  Tear down canonical.testing.layers.ZopelessLayer ... not supported
  Tear down canonical.testing.layers.LaunchpadLayer in 0.000 seconds.
  Tear down canonical.testing.layers.LibrarianLayerTraceback (most
recent call last):

  File "./bin/test", line 267, in <module>
    testrunner.run([])
  File "/home/launchpad/lp-sourcedeps/eggs/zope.testing-3.9.4_p1-py2.6.egg/zope/testing/testrunner/__init__.py",
line 32, in run
    failed = run_internal(defaults, args, script_parts=script_parts)
  File "/home/launchpad/lp-sourcedeps/eggs/zope.testing-3.9.4_p1-py2.6.egg/zope/testing/testrunner/__init__.py",
line 45, in run_internal
    runner.run()
  File "/home/launchpad/lp-sourcedeps/eggs/zope.testing-3.9.4_p1-py2.6.egg/zope/testing/testrunner/runner.py",
line 138, in run
    self.run_tests()
  File "/home/launchpad/lp-sourcedeps/eggs/zope.testing-3.9.4_p1-py2.6.egg/zope/testing/testrunner/runner.py",
line 243, in run_tests
    tear_down_unneeded(self.options, (), setup_layers, True)
  File "/home/launchpad/lp-sourcedeps/eggs/zope.testing-3.9.4_p1-py2.6.egg/zope/testing/testrunner/runner.py",
line 605, in tear_down_unneeded
    l.tearDown()
  File "/home/launchpad/lp-branches/trunk/lib/canonical/testing/profiled.py",
line 29, in profiled_func
    return func(cls, *args, **kw)
  File "/home/launchpad/lp-branches/trunk/lib/canonical/testing/layers.py",
line 592, in tearDown
    LibrarianLayer._check_and_reset()
  File "/home/launchpad/lp-branches/trunk/lib/canonical/testing/profiled.py",
line 29, in profiled_func
    return func(cls, *args, **kw)
  File "/home/launchpad/lp-branches/trunk/lib/canonical/testing/layers.py",
line 610, in _check_and_reset
    "shutdown: " + str(e)
canonical.testing.layers.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]
[Errno 111] Connection refused

General warnings.

/usr/lib/python2.6/atexit.py:24: DeprecationWarning: Attempt to
tearDown inactive fixture.
  func(*targs, **kargs)



Follow ups