Comment 0 for bug 884036

Revision history for this message
Robert Collins (lifeless) wrote :

External appservers like those started by ZopelessAppserverLayer talk to the same test DB as the test being executed.

If there are two tests in the layer, and one of them triggers a db reset (e.g. by doing a commit() rather than a rollback where we can just reset the db sequences), then the slave appserver is forcibly disconnected from the database (as is the librarian and other helpers).

Subsequent requests to the appserver will trigger oopses (which will retry so the thing -works- but we have an oops logged. And, because the next requestor is the next test, that test will see 'spurious' oopses if and only if it is run directly after a test that caused the testdb to be dropped (by committing).

oops-3: {{{
Oops-Id: OOPS-ec2ee8085482c92c96e7e288cb8ca88e
Exception-Type: AssertionError
Exception-Value: Bug #504291: Store left in a disconnected state.
Date: 2011-10-31T00:30:10.023000+00:00
Page-Id:
Branch: useoops
Revision: 14111
User: unauthenticated, Anonymous, Anonymous, Anonymous User
URL: http://launchpad.dev:8085
Duration: -1
Oops-Reporter: T

CHANNEL_CREATION_TIME=1320021009.97
CONTENT_LENGTH=286
CONTENT_TYPE=text/xml
GATEWAY_INTERFACE=CGI/1.1
HTTP_HOST=xmlrpc-private.launchpad.dev:8087
HTTP_USER_AGENT=xmlrpclib.py/1.0.1 (by www.pythonware.com)
PATH_INFO=/codehosting
REMOTE_ADDR=127.0.0.1
REQUEST_METHOD=POST
SCRIPT_NAME=
SERVER_NAME=lucid-test-lp
SERVER_PORT=8087
SERVER_PROTOCOL=HTTP/1.0
SERVER_SOFTWARE=zope.server.http (PrivateXMLRPC)
wsgi.input=%3Chidden%3E
xmlrpc args=%5B%27+launchpad-services%27, %27//%7Eperson-name-425389/product-name-425384/.bzr/branch-format%27%5D
zc.zservertracelog.interfaces.ITraceLog=%3Chidden%3E

Traceback (most recent call last):
  Module canonical.launchpad.webapp.publication, line 762, in endRequest
    "Bug #504291: Store left in a disconnected state.")
AssertionError: Bug #504291: Store left in a disconnected state.
}}}