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

[tor-commits] [arm/master] Give daemon tracker test more time



commit b3744c93608df020e07e59069e2d5803c05ec164
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sun Sep 21 12:10:18 2014 -0700

    Give daemon tracker test more time
    
    Our daemon tracker checks that when configured to run every 0.01 seconds it
    fires at *least* twice in 0.05. As with any timing test though this can still go
    awry...
    
    ======================================================================
    FAIL: test_pausing_daemon (util.tracker.daemon.TestDaemon)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/mock.py", line 1201, in patched
        return func(*args, **keywargs)
      File "/home/atagar/Desktop/arm/test/util/tracker/daemon.py", line 76, in test_pausing_daemon
        self.assertTrue(2 < daemon.run_counter())
    AssertionError: False is not true
    
    ----------------------------------------------------------------------
    
    Bumping the test time to 0.2 to give it four times as long. In all the test
    runs I've done this is the first time for this to crop up so should be more
    than enough.
---
 test/util/tracker/daemon.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/util/tracker/daemon.py b/test/util/tracker/daemon.py
index 89f6031..5bf75fd 100644
--- a/test/util/tracker/daemon.py
+++ b/test/util/tracker/daemon.py
@@ -63,7 +63,7 @@ class TestDaemon(unittest.TestCase):
     # Check that we can pause and unpause daemon.
 
     with Daemon(0.01) as daemon:
-      time.sleep(0.05)
+      time.sleep(0.2)
       self.assertTrue(2 < daemon.run_counter())
 
       daemon.set_paused(True)
@@ -72,5 +72,5 @@ class TestDaemon(unittest.TestCase):
       self.assertEqual(0, daemon.run_counter())
 
       daemon.set_paused(False)
-      time.sleep(0.05)
+      time.sleep(0.2)
       self.assertTrue(2 < daemon.run_counter())



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