[Buildbot-commits] buildbot/buildbot/test test_bonsaipoller.py, 1.5, 1.6
Brian Warner
warner at users.sourceforge.net
Thu Jul 24 21:21:39 UTC 2008
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11785/buildbot/test
Modified Files:
test_bonsaipoller.py
Log Message:
[project @ test_bonsaipoller.py: fix test failures on systems with low-res time.time]
Original author: warner at lothar.com
Date: 2008-07-24 20:44:50+00:00
Index: test_bonsaipoller.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_bonsaipoller.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- test_bonsaipoller.py 29 Apr 2008 20:21:27 -0000 1.5
+++ test_bonsaipoller.py 24 Jul 2008 21:21:37 -0000 1.6
@@ -217,9 +217,14 @@
poller = FakeBonsaiPoller()
lastChangeBefore = poller.lastChange
- # generate an exception first
+ # generate an exception first. pretend that we're doing a poll and
+ # increment the timestamp, otherwise the failIfEqual test at the
+ # bottom will depend upon there being a noticeable difference between
+ # two successive calls to time.time().
+ poller.lastPoll += 1.0
poller._process_changes(badUnparsedResult)
# now give it a valid one...
+ poller.lastPoll += 1.0
poller._process_changes(goodUnparsedResult)
# if poller.lastChange has not been updated then the good result
# was not parsed
More information about the Commits
mailing list