No way to ask bzrlib to close an SFTP connection

Bug #36294 reported by Andrew Bennetts
4
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Vincent Ladeuil

Bug Description

When writing a test for something involving bzr and an SFTP server, I had a need to close an SFTP connection (to force the next branch open to open a new connection). bzrlib offers no facility for this that I can see, apart from "bzrlib.transport.sftp._connected_hosts.clear()", which is clearly not supported :)

I can imagine other users of bzrlib may need to control this as well.

Revision history for this message
Jonathan Lange (jml) wrote :

Well, now it provides 'clear_connection_cache()', but that's still not quite enough.

Changed in bzr:
status: Unconfirmed → Confirmed
Revision history for this message
Jonathan Lange (jml) wrote :

Apr 18 14:09:13 <lifeless> bzrlib/transport/remote.py has a disconnect method
Apr 18 14:09:26 <lifeless> if you add one to sftp.py that would be nice.
Apr 18 14:09:36 <lifeless> perhaps at the base class, with a no-op.
Apr 18 14:09:40 <lifeless> docstring
...
Apr 18 14:16:24 <jml> lifeless: by 'at the base class', which class do you mean exactly?
Apr 18 14:16:33 <lifeless> Transport

Changed in bzr:
assignee: nobody → jml
Jonathan Lange (jml)
Changed in bzr:
assignee: Jonathan Lange (jml) → nobody
Revision history for this message
Vincent Ladeuil (vila) wrote :

The fixes related to the leaking tests as landed in 2.3b1 and they introduced a disconnect() method implemented for SFTPTransport.

Changed in bzr:
assignee: nobody → Vincent Ladeuil (vila)
milestone: none → 2.3b1
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.