← Back to team overview

launchpad-dev team mailing list archive

Test failure in webservice-marshallers.txt

 

Hi,

I'm seeing a test failure in webservice-marshallers.txt:

File "lib/canonical/launchpad/ftests/../doc/webservice-marshallers.txt",
line 86, in webservice-marshallers.txt
Failed example:
    request.publication.endRequest(request, None)
Exception raised:
    Traceback (most recent call last):
      File
      "/home/jw2328/devel/lp-sourcedeps/eggs/zope.testing-3.8.1-py2.5.egg/zope/testing/doctest.py",
      line 1361, in __run
        compileflags, 1) in test.globs
      File "<doctest webservice-marshallers.txt[line 86, example 31]>",
      line 1, in <module>
      File
      "/home/jw2328/devel/launchpad/devel/lib/canonical/launchpad/webapp/publication.py",
      line 634, in endRequest
        self.endProfilingHook(request)
      File
      "/home/jw2328/devel/launchpad/devel/lib/canonical/launchpad/webapp/publication.py",
      line 706, in endProfilingHook
        now = datetime.fromtimestamp(da.get_request_start_time())
    TypeError: a float is required

Michael confirms that he sees it in devel, db-devel and
production-devel.

It looks to me like
canonical.launchpad.webapp.adapter.set_request_started() is never being
called, but the test explicitly ends the request with

  request.publication.endRequest(request, None)

which causes the failure.

The set_request_started() function appears to be usually called by

  LaunchpadBrowserPublication.beforeTraversal(request)

which isn't called by this test, but is by a couple of others.

Adding a call to that method fails as login() has already been
done. Perhaps it would work to add it earlier though.

buildbot isn't showing any failures for this, so Michael suspects it to
be environmental changes. We are both running lucid. I haven't
upgraded any packages recently, but I'm not sure I've run this test
locally before.

If we assume that it is lucid, what package is used from the base system
that could be involved here? I would assume that all the zope stuff
which would affect the publication comes from eggs.

Is it correct that this test should have started the request? If so,
does it need to do it explicitly? How? If it should be done by something
else, what should take care of it? Is there a hole in the test coverage
that means this isn't being caught by the automated tests of buildbot?

I'm going to leave this alone now, and hope that someone with more zope
knowledge can fix it. It's eaten enough of my time already.

Thanks,

James




Follow ups