[tor-commits] [stem/master] Lower work done by couple BaseController tests

atagar at torproject.org atagar at torproject.org
Mon Jan 30 18:31:26 UTC 2017


commit 30ea552a92346cc733bcac82e7d16cdc8ac1efa8
Author: Damian Johnson <atagar at torproject.org>
Date:   Fri Jan 20 10:42:28 2017 -0800

    Lower work done by couple BaseController tests
    
    Reducing the amount our test_connect_repeatedly and test_msg_repeatedly tests
    hammer our controller so the tests don't take so long (drops from 1.6s to 0.3s
    on my netbook).
---
 test/integ/control/base_controller.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/integ/control/base_controller.py b/test/integ/control/base_controller.py
index 5beffc2..2507293 100644
--- a/test/integ/control/base_controller.py
+++ b/test/integ/control/base_controller.py
@@ -54,7 +54,7 @@ class TestBaseController(unittest.TestCase):
     with test.runner.get_runner().get_tor_socket() as control_socket:
       controller = stem.control.BaseController(control_socket)
 
-      for _ in range(250):
+      for _ in range(50):
         controller.connect()
         controller.close()
 
@@ -105,7 +105,7 @@ class TestBaseController(unittest.TestCase):
       controller = stem.control.BaseController(control_socket)
 
       def run_getinfo():
-        for _ in range(150):
+        for _ in range(50):
           try:
             controller.msg('GETINFO version')
             controller.msg('GETINFO blarg')
@@ -121,7 +121,7 @@ class TestBaseController(unittest.TestCase):
         msg_thread.setDaemon(True)
         msg_thread.start()
 
-      for index in range(100):
+      for index in range(50):
         controller.connect()
         controller.close()
 





More information about the tor-commits mailing list