Skip to content

Commit 038059e

Browse files
committed
Cleanups, trying to get travis tests working
1 parent 989f76b commit 038059e

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ language: python
22
python:
33
- "2.6"
44
- "2.7"
5-
before_install:
6-
- sudo apt-get install -qq libevent-dev
75
install:
86
- pip install -r requirements.txt --use-mirrors
97
script: nosetests

pssh.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
See SSHClient and ParallelSSHClient"""
55

66
import gevent.pool
7-
from gevent import monkey
8-
monkey.patch_all()
7+
from gevent import socket
98
import paramiko
109
import os
1110
import logging
12-
import socket
11+
from gevent import monkey
12+
monkey.patch_all()
1313

1414
host_logger = logging.getLogger('host_logging')
1515
handler = logging.StreamHandler()

tests/test_pssh_client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff 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")

0 commit comments

Comments
 (0)