This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients pablogsal, vstinner
Date 2018-12-16.22:05:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

Unhandled exception in thread started by <function Bunch.__init__.<locals>.task at 0x111775cb0>
Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/", line 41, in task
  File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/", line 591, in f
    self.assertTimeout(dt, 0.1)
  File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/", line 80, in assertTimeout
    self.assertGreaterEqual(actual, expected * 0.6)
  File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/unittest/", line 1283, in assertGreaterEqual, standardMsg))
  File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/unittest/", line 719, in fail
    raise self.failureException(msg)
AssertionError: -0.24049997329711914 not greater than or equal to 0.06
test_waitfor_timeout (test.test_threading.ConditionTests) ... FAIL


                dt = time.time()
                result = cond.wait_for(lambda : state==4, timeout=0.1)
                dt = time.time() - dt
                self.assertTimeout(dt, 0.1)


    def assertTimeout(self, actual, expected):
        self.assertGreaterEqual(actual, expected * 0.6)

It seems like time.time() gone backward on the buildbot. The test must use time.monotonic() to measure time difference.

Attached PR fix the issue.
Date User Action Args
2018-12-16 22:05:49vstinnersetrecipients: + vstinner, pablogsal
2018-12-16 22:05:49vstinnersetmessageid: <>
2018-12-16 22:05:49vstinnerlinkissue35513 messages
2018-12-16 22:05:48vstinnercreate