Resolving the last of the selftest thread hangs
John Arbash Meinel
john at arbash-meinel.com
Mon Oct 18 20:38:47 BST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10/18/2010 8:52 AM, Martin (gzlist) wrote:
> On 07/10/2010, Martin Pool <mbp at canonical.com> wrote:
>> I think it would be a good incremental improvement to use a hook here
>> rather than monkeypatching, and the hook might be useful in other
>> cases too.
>
> Have put up an mp that implements a transport post_connect hook, and
> despite a few complications, it does basically work:
>
> <https://code.launchpad.net/~gz/bzr/transport_post_connect_hook/+merge/38431>
We already have per-transport tests, and I would guess that we should
have per-connected-transport tests (worst case, use per-transport and
check if connected type.)
Why not just have a test that ensures that for any transport that can be
"connected", that it fires the hook. (So open the transport, do
something on it, and assert that "I connected" was called.)
Then you can put it wherever you want inside a given transport, as long
as it conforms to the design goal of letting you know that there is a
connection that needs to be cleaned up.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAky8okcACgkQJdeBCYSNAANkLACg1ft5PleQaMtUptNqD/4Gjehg
RBoAnRcNuLwKobFuwjs1cwx0jYTDhqOj
=Y3T5
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list