]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[test/test_socks] Use a different port range
authorYen Chi Hsuan <yan12125@gmail.com>
Sun, 8 May 2016 07:16:32 +0000 (15:16 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Tue, 10 May 2016 06:51:38 +0000 (14:51 +0800)
Seems on Travis CI, ports in the original range are often used.

test/test_socks.py

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