in the test that verifies key renegotiation during a large file "put", also
do a "get" of the large file (with prefetch) to verify that nothing screwy
happens.
This commit is contained in:
Robey Pointer 2008-03-22 19:00:54 -07:00
parent 613d2a2f24
commit 419b11b741
1 changed files with 7 additions and 0 deletions

View File

@ -372,6 +372,13 @@ class BigSFTPTest (unittest.TestCase):
self.assertEqual(sftp.stat('%s/hongry.txt' % FOLDER).st_size, 1024 * 1024) self.assertEqual(sftp.stat('%s/hongry.txt' % FOLDER).st_size, 1024 * 1024)
self.assertNotEquals(t.H, t.session_id) self.assertNotEquals(t.H, t.session_id)
# try to read it too.
f = sftp.open('%s/hongry.txt' % FOLDER, 'r', 128 * 1024)
f.prefetch()
for i in xrange(32):
f.read(32 * 1024)
f.close()
finally: finally:
sftp.remove('%s/hongry.txt' % FOLDER) sftp.remove('%s/hongry.txt' % FOLDER)
t.packetizer.REKEY_BYTES = pow(2, 30) t.packetizer.REKEY_BYTES = pow(2, 30)