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

Robert Collins robertc at robertcollins.net
Sat Mar 25 21:23:41 GMT 2006


On Sun, 2006-03-26 at 07:50 +1100, Robert Collins wrote:
> 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

It appears I glommed in my missing ui change to not lock write unless
needed with this patch - sorry.

Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- 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/a35f35cf/attachment.pgp 


More information about the bazaar mailing list