File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ language: python
22python :
33 - " 2.6"
44 - " 2.7"
5- before_install :
6- - sudo apt-get install -qq libevent-dev
75install :
86 - pip install -r requirements.txt --use-mirrors
97script : nosetests
Original file line number Diff line number Diff line change 44See SSHClient and ParallelSSHClient"""
55
66import gevent .pool
7- from gevent import monkey
8- monkey .patch_all ()
7+ from gevent import socket
98import paramiko
109import os
1110import logging
12- import socket
11+ from gevent import monkey
12+ monkey .patch_all ()
1313
1414host_logger = logging .getLogger ('host_logging' )
1515handler = logging .StreamHandler ()
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ def setUp(self):
2121 def test_pssh_client_exec_command (self ):
2222 listen_port = random .randint (1026 , 65534 )
2323 server = gevent .spawn (listen , { self .fake_cmd : self .fake_resp }, listen_port = listen_port )
24- server .join (5 )
2524 client = ParallelSSHClient (['localhost' ], port = listen_port )
25+ gevent .sleep (0 )
2626 cmd = client .exec_command (self .fake_cmd )[0 ]
2727 output = client .get_stdout (cmd )
2828 expected = {'localhost' : {'exit_code' : 0 }}
@@ -34,11 +34,13 @@ def test_pssh_client_exec_command(self):
3434 def test_pssh_client_auth_failure (self ):
3535 listen_port = random .randint (2048 , 65534 )
3636 server = gevent .spawn (listen , { self .fake_cmd : self .fake_resp },
37- listen_port = listen_port , fail_auth = True , )# link_callback=)
38- server .join (5 )
37+ listen_port = listen_port , fail_auth = True , )
3938 client = ParallelSSHClient (['localhost' ], port = listen_port )
39+ gevent .sleep (0 )
40+ server .join (1 )
4041 cmd = client .exec_command (self .fake_cmd )[0 ]
41- # Handle exception
42+ server .join (1 )
43+ # Handle exception
4244 try :
4345 cmd .get ()
4446 raise Exception ("Expected AuthenticationException, got none" )
You can’t perform that action at this time.
0 commit comments