The tokio::time::advance should trigger a subscription renewal and the hub listener should receive a subscription request, but in fact, the listener occasionally hangs.
If you uncomment the yield_now, the Scheduler's get_next_tick callback seems to fire before calling tokio::time::advance(), which is unexpected since the refresh_time has not passed then.
Workaround for this was made by replacing the usage of pause()/advance() with actual sleep()s (2b2fb9cf8e34d7e678579a1697a874405ea83240), but this is definitely not great as it significantly delays the tests.
Offending code in the test:
https://github.com/tesaguri/pipitor/blob/a664f9e5b2271e38a8bd80c534f4cba6ee003122/src/websub/subscriber.rs#L340-L350
The
tokio::time::advance
should trigger a subscription renewal and the hublistener
should receive a subscription request, but in fact, thelistener
occasionally hangs.If you uncomment the
yield_now
, theScheduler
'sget_next_tick
callback seems to fire before callingtokio::time::advance()
, which is unexpected since therefresh_time
has not passed then.tokio-rs/tokio#2090 may be relevant, I guess.