launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #04491
Re: Lighter tests with FakeLibrarian
On Tuesday 24 August 2010 17:18:35 Jeroen Vermeulen wrote:
> == So does it? Work, I mean? ==
>
> It does for me. I tried converting one test case and got roughly a 20%
> speedup, both for setup and for running the tests. That's compared to a
> real Librarian and memcached that are already running before the test
> starts.
Hi Jeroen
I tried it on the Soyuz uploader tests, which make very heavy use of the
librarian. The picture is not rosy :(
The biggest problem is:
def create(self, name, size, file, contentType, expires=None,
debugID=None, restricted=False):
"See `ILibraryFileAliasSet`."""
return self.addFile(
name, size, file, contentType, expires=expires, debugID=debugID)
but:
def addFile(self, name, size, file, contentType, expires=None):
i.e. there's no "debugID". I removed that from the call and got further, but
I saw loads of exceptions (unfortunately the stack trace is hidden because of
up the uploader works) but it was complaining that:
'int' object has no attribute 'filename'
which I guess is caused by the code in getURLForAlias().
I'd be happy to work with you this week to fix this up!
Cheers
J
Follow ups
References