Merge lp:~jtv/launchpad/use-fakelibrarian into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Graham Binns |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11427 |
Proposed branch: | lp:~jtv/launchpad/use-fakelibrarian |
Merge into: | lp:launchpad |
Prerequisite: | lp:~jtv/launchpad/fakelibrarian-commit |
Diff against target: |
223 lines (+43/-36) 1 file modified
lib/lp/translations/utilities/tests/test_file_importer.py (+43/-36) |
To merge this branch: | bzr merge lp:~jtv/launchpad/use-fakelibrarian |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Robert Collins | code | Pending | |
Review via email: mp+33324@code.launchpad.net |
Commit message
Convert a test to FakeLibrarian.
Description of the change
= Convert a test to FakeLibrarian =
Requires the lp:~jtv/launchpad/fakelibrarian-commit branch.
The Translations import engine annoyingly relies on the Librarian from the very first point where an upload is picked for processing all the way down into the per-format input parsers. I'm hoping to fix that someday but until that day, here's a branch that converts one of the most badly affected tests to use the FakeLibrarian.
I cleaned up a bunch of lint later, so that may be a little distracting. The meat of the matter is in the transaction.commit calls that have been replaced with self.fakelibrar
The change speeds up the test by about 20% (based on the shortest times used by the second of two pairs of runs each, to eliminate cache variability as much as possible). The percentage is about equal for setup, which no longer requires the LibrarianLayer; test run time; and overall test time. All numbers as reported by "bin/test -vvv."
The test runs were done with LP_PERSISTENT_
Jeroen