[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [ooni-probe/master] Randomly pick the socks and control port in test_settings.



commit 573eb77c3b268ae6cd9f052f5ff421d8ffc6a3cf
Author: Arturo Filastò <art@xxxxxxxxx>
Date:   Mon Sep 29 13:34:49 2014 +0200

    Randomly pick the socks and control port in test_settings.
    
    This fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763264
---
 ooni/tests/test_settings.py |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ooni/tests/test_settings.py b/ooni/tests/test_settings.py
index ab33e26..1d36b83 100644
--- a/ooni/tests/test_settings.py
+++ b/ooni/tests/test_settings.py
@@ -106,8 +106,8 @@ class TestSettings(ConfigTestCase):
         """
         self.skipTest("See comment in the code")
         self.conf.advanced.start_tor = False
-        self.conf.tor.socks_port = 9999
-        self.conf.tor.control_port = 9998
+        self.conf.tor.socks_port = net.randomFreePort()
+        self.conf.tor.control_port = net.randomFreePort()
         self.tor_process = yield self.run_tor()
         yield self.conf.check_incoherences(self.configuration)
         self.tor_process.transport.signalProcess('TERM')
@@ -119,7 +119,7 @@ class TestSettings(ConfigTestCase):
     @defer.inlineCallbacks
     def test_check_tor_silly_listener(self):
         self.conf.advanced.start_tor = False
-        self.conf.tor.socks_port = 9999
+        self.conf.tor.socks_port = net.randomFreePort()
         self.conf.tor.control_port = None
         self.run_silly_server()
         try:



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits