You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that possibly TimerHandle#when isn't properly mocked? I'm trying to write a reschedulable timer, so that if you try to rescheduled it for shorter than the original request it fails, but you can easily extend it. This code was failing and adding some logging reveals very unexpected results around the timing values.
IE: find the currently planned execution time, how far into the future it is... and reschedule (or not depending)... but in logging both timer.when() and loop.time() I get output like:
(--) when 1945811.476378708
(--) loop time 2.0
(--) 1945809.476378708 until wake
It looks like loop time is being mocked as the tests moved thru time (I have a await asyncio.sleep(2)) but that the when() call is still returning some actual timestamp from the live running system.
If you need any additional details, please ask.
The text was updated successfully, but these errors were encountered:
Long story short
It seems that possibly TimerHandle#when isn't properly mocked? I'm trying to write a reschedulable timer, so that if you try to rescheduled it for shorter than the original request it fails, but you can easily extend it. This code was failing and adding some logging reveals very unexpected results around the timing values.
Description
Code in question:
IE: find the currently planned execution time, how far into the future it is... and reschedule (or not depending)... but in logging both
timer.when()
andloop.time()
I get output like:It looks like
loop time
is being mocked as the tests moved thru time (I have aawait asyncio.sleep(2)
) but that thewhen()
call is still returning some actual timestamp from the live running system.If you need any additional details, please ask.
The text was updated successfully, but these errors were encountered: