Test spends too long in wait()

Robert Collins robertc at robertcollins.net
Thu Apr 27 02:49:50 BST 2006


On Wed, 2006-04-26 at 17:42 -0500, John Arbash Meinel wrote:
> When running bzr selftest, I found that:
> TransportImplementation.test_connection_error(SFTPHomeDirServer)
> 
> Will SKIP, and report that it only takes 1ms to run. But really it hangs
> for a fairly long time (~5s).
> 
> If you ^C while it is hanging it shows that it is in wait() status.
> 
> So I'm thinking it is an issue that raising TestSkipped() in an SFTP
> tests never tells the server thread to exit.
> I'm not sure what the best method to fix this is.
> 
> Would it be better if cleanup code was called even if the test was
> skipped? (I'm assuming that is where the server is told to shutdown).

This is due to a connection that is inited but not closed. Call the
bzrlib.transport.sftp.clear_connection_cache() method in the tearDown of
that test method.

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/20060427/306ef2b1/attachment.pgp 


More information about the bazaar mailing list