commit 76f82d74960df9bccececff6792aa7dab88cd77b Author: Damian Johnson atagar@torproject.org Date: Sat May 11 17:30:29 2013 -0700
Allowing for instantanious closure in test_status_notifications
Well, that's a little odd. Our jenkins instance reported a failure of test_status_notifications...
====================================================================== FAIL: test_status_notifications ---------------------------------------------------------------------- Traceback: File "/srv/jenkins-workspace/workspace/stem-tor-ci/test/integ/control/base_controller.py", line 224, in test_status_notifications self.assertTrue(state_observer.timestamp < time.time()) AssertionError
----------------------------------------------------------------------
In the past we've seen test failures due to dixie being far, far faster than my netbook. I'm a little dubious that state_observer.timestamp truely equaled time.time() (that would imply that the above statements took zero nanoseconds) but oh well. I've only seen this happen once and there's little reason not to pass when they're equal. --- test/integ/control/base_controller.py | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/integ/control/base_controller.py b/test/integ/control/base_controller.py index b91dd24..0226022 100644 --- a/test/integ/control/base_controller.py +++ b/test/integ/control/base_controller.py @@ -221,14 +221,14 @@ class TestBaseController(unittest.TestCase): controller.close() self.assertEquals(controller, state_observer.controller) self.assertEquals(stem.control.State.CLOSED, state_observer.state) - self.assertTrue(state_observer.timestamp < time.time()) + self.assertTrue(state_observer.timestamp <= time.time()) self.assertTrue(state_observer.timestamp > time.time() - 1.0) state_observer.reset()
controller.connect() self.assertEquals(controller, state_observer.controller) self.assertEquals(stem.control.State.INIT, state_observer.state) - self.assertTrue(state_observer.timestamp < time.time()) + self.assertTrue(state_observer.timestamp <= time.time()) self.assertTrue(state_observer.timestamp > time.time() - 1.0) state_observer.reset()
@@ -237,7 +237,7 @@ class TestBaseController(unittest.TestCase): self.assertRaises(stem.SocketClosed, controller.msg, "blarg") self.assertEquals(controller, state_observer.controller) self.assertEquals(stem.control.State.CLOSED, state_observer.state) - self.assertTrue(state_observer.timestamp < time.time()) + self.assertTrue(state_observer.timestamp <= time.time()) self.assertTrue(state_observer.timestamp > time.time() - 1.0) state_observer.reset()
@@ -257,6 +257,6 @@ class TestBaseController(unittest.TestCase): time.sleep(0.1) # not much work going on so this doesn't need to be much self.assertEquals(controller, state_observer.controller) self.assertEquals(stem.control.State.CLOSED, state_observer.state) - self.assertTrue(state_observer.timestamp < time.time()) + self.assertTrue(state_observer.timestamp <= time.time()) self.assertTrue(state_observer.timestamp > time.time() - 1.0) state_observer.reset()
tor-commits@lists.torproject.org