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

[tor-commits] [stem/master] Stating runtime when launch_tor timeout test fails



commit ce07df9962bc464c338cbee0753e40169f801505
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sun May 20 15:11:55 2012 -0700

    Stating runtime when launch_tor timeout test fails
    
    Just had a transient testing failure from test_launch_tor_with_timeout. There's
    nothing to go on since we don't even know how long the test took, so providing
    that information on failure. Might need to mess with the bounds a bit if this
    happens again.
---
 test/integ/process.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/test/integ/process.py b/test/integ/process.py
index b7e5040..470faa7 100644
--- a/test/integ/process.py
+++ b/test/integ/process.py
@@ -49,5 +49,7 @@ class TestProcess(unittest.TestCase):
     start_time = time.time()
     self.assertRaises(OSError, stem.process.launch_tor_with_config, {'SocksPort': '2777'}, "tor", 100, None, 2)
     runtime = time.time() - start_time
-    self.assertTrue(runtime > 2 and runtime < 3)
+    
+    if not (runtime > 2 and runtime < 3):
+      self.fail("Test should have taken 2-3 seconds, took %i instead" % timeout)
 

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