AppServer layer explodes during setUp when DB revision is incorrect
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Low
|
Jonathan Lange |
Bug Description
Unlike bin/test or 'make run', if DB has not been updated with 'make schema', running windmill tests fails with a failure how appserver can't be started instead of warning about database revision.
$ bin/test -vv --layer=
Running tests at level 1
Running lp.translations
Set up canonical.
Set up canonical.
Set up canonical.
Set up canonical.
Set up canonical.
Set up canonical.
Set up canonical.
Set up canonical.
File "/home/
setup_
File "/home/
setup_
File "/home/
setup_
File "/home/
layer.setUp()
File "/home/
return func(cls, *args, **kw)
File "/home/
LayerProces
File "/home/
return func(cls, *args, **kw)
File "/home/
cls.
File "/home/
connection = urlopen(root_url)
File "/usr/lib/
return opener.open(url)
File "/usr/lib/
return getattr(self, name)(url)
File "/usr/lib/
errcode, errmsg, headers = h.getreply()
File "/usr/lib/
response = self._conn.
File "/usr/lib/
response.
File "/usr/lib/
version, status, reason = self._read_status()
File "/usr/lib/
line = self.fp.readline()
File "/usr/lib/
data = recv(1)
IOError: [Errno socket error] (104, 'Connection reset by peer')
Tearing down left over layers:
Tear down canonical.
Tear down canonical.
Tear down canonical.
Tear down canonical.
Tear down canonical.
Tear down canonical.
Tear down canonical.
Tests with errors:
runTest (zope.testing.
** 2 import policy violations **
There were 2 imports of names not appearing in the __all__.
You should not import domain_match from cookielib:
canonical.
You should not import mktime_tz from email.Utils:
canonical.
Related branches
- Henning Eggers (community): Approve (code)
-
Diff: 53 lines (+11/-7)2 files modifiedlib/canonical/database/revision.py (+5/-6)
lib/canonical/testing/layers.py (+6/-1)
tags: | added: build-infrastructure |
Changed in launchpad-foundations: | |
assignee: | nobody → Jonathan Lange (jml) |
importance: | Undecided → Low |
milestone: | none → 3.1.12 |
status: | New → In Progress |
summary: |
- Running bin/test with a windmill layer doesn't indicate when DB revision - is incorrect + AppServer layer explodes during setUp when DB revision is incorrect |
Changed in launchpad-foundations: | |
status: | Fix Committed → Fix Released |
The bug report is a little incorrect:
* The reported behaviour occurs with any AppServer tests
* bin/test itself does not warn about database revision, it also explodes, but with a different (and more helpful) error
To reproduce the bug, create a new database patch file (touch database/ schema/ patch-2207- 17-0.sql) , and run './bin/test -vv test_launchpadlib'.
To demonstrate the presumably expected behaviour, run './bin/test -vv test_branchcoll ection' . Note that the error happens during the layer's testSetUp.
I've produced a fix, and linked the branch to this report.