Browse Source

[test/test_socks] Use a different port range

Seems on Travis CI, ports in the original range are often used.
master
Yen Chi Hsuan 8 years ago
parent
commit
c2876afafe
No known key found for this signature in database GPG Key ID: 3FDDD575826C5C30
1 changed files with 1 additions and 1 deletions
  1. 2
      test/test_socks.py

2
test/test_socks.py

@ -78,7 +78,7 @@ class TestMultipleSocks(unittest.TestCase):
class TestSocks(unittest.TestCase): class TestSocks(unittest.TestCase):
def setUp(self): def setUp(self):
self.port = random.randint(49152, 65535)
self.port = random.randint(20000, 30000)
self.server_process = subprocess.Popen([ self.server_process = subprocess.Popen([
'srelay', '-f', '-i', '127.0.0.1:%d' % self.port], 'srelay', '-f', '-i', '127.0.0.1:%d' % self.port],
stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

Loading…
Cancel
Save