[PATCH] fix bound branch SFTP test speed, and optimise somewhat.

Robert Collins robertc at robertcollins.net
Sat Mar 25 20:50:09 GMT 2006


I've done a mini optimisation pass over the bound branch section of the
test suite. There are some clearly right things:

 * reduce lock-unlock sequences in WorkingTree disk construction.
 * fix the 5 second timeout that was triggering in the bound branch SFTP
tests.

There is some more controversial stuff though, which may need
discussion. I've changed the blackbox tests for bound branches a little
- to use the bzrlib api *when setting up the test*, and the ui only to
execute the test itself. I think this is a nicer pattern on balance than
using the command line tool only, for several reasons:
 - Its impossible to test failure modes adequately with just the command
line API because its designed *not* to introduce bad state.
 - Its (IMO) often clearer to use the library api when evaluating
whether the outcome [not the output, rather the resulting disk state] of
a test is correct.
 - We have more flexability when we need it, and having the library api
routinely used means that folk patching or adding bugs will have good
examples and not have to struggle over the question of whether to use it
or not.

Seeking comments and a +1
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bound-branch-test-performance.patch
Type: text/x-patch
Size: 7813 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060326/c60caa08/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060326/c60caa08/attachment.pgp 


More information about the bazaar mailing list