@@ -328,8 +328,6 @@ def test_pssh_copy_file(self):
328
328
test_file = open (local_filename , 'w' )
329
329
test_file .writelines ([test_file_data + os .linesep ])
330
330
test_file .close ()
331
- server = start_server ({ self .fake_cmd : self .fake_resp },
332
- self .listen_socket )
333
331
client = ParallelSSHClient ([self .host ], port = self .listen_port ,
334
332
pkey = self .user_key )
335
333
cmds = client .copy_file (local_filename , remote_filename )
@@ -341,7 +339,6 @@ def test_pssh_copy_file(self):
341
339
for filepath in [local_filename , remote_filename ]:
342
340
os .unlink (filepath )
343
341
del client
344
- server .join ()
345
342
346
343
def test_pssh_client_directory (self ):
347
344
"""Tests copying directories with SSH client. Copy all the files from
@@ -417,7 +414,6 @@ def test_pssh_hosts_more_than_pool_size(self):
417
414
msg = "Did not get expected output from all hosts. \
418
415
Got %s - expected %s" % (stdout , expected_stdout ,))
419
416
del client
420
- # server1.kill()
421
417
del server2
422
418
423
419
def test_ssh_proxy (self ):
@@ -440,7 +436,7 @@ def test_ssh_proxy(self):
440
436
msg = "Got unexpected stdout - %s, expected %s" %
441
437
(stdout ,
442
438
expected_stdout ,))
443
- # server.kill()
439
+ self . server .kill ()
444
440
proxy_server .kill ()
445
441
446
442
def test_bash_variable_substitution (self ):
@@ -537,6 +533,7 @@ def test_ssh_exception(self):
537
533
user = 'fakey' , password = 'fakey' ,
538
534
pkey = paramiko .RSAKey .generate (1024 ))
539
535
output = client .run_command (self .fake_cmd , stop_on_errors = False )
536
+ gevent .sleep (.2 )
540
537
client .pool .join ()
541
538
self .assertTrue ('exception' in output [host ],
542
539
msg = "Got no exception for host %s - expected connection error" % (
0 commit comments