is there a rust crate for controlling clock in tes...
# development
f
is there a rust crate for controlling clock in tests?
1
w
i think it would need to be executor specific
so either tokio (if that’s what is delaying) or the gRPC stack… which is using the underlying grpc c library
f
I’ll open an issue. As I write the RE streaming PR, the tests that test time outs occurring seem brittle.
w
so, some of them probably stems from a difference in opinions on test timeouts
i try to differentiate “positive” timeouts (the time you wait for something that you want to happen to happen) from “negative” timeouts (the time you wait for something that you don’t want to happen)
f
In this case, these are time outs in the actual RE client and the test is testing that the RE client times out.
w
positive timeouts should be set very long (and should not be sleeps … should be based on polling or events)
f
If this was Ruby, I’d use Timecop and would have the test advance time when it wanted to force the time out.
w
right, so that’s a positive timeout.
yea. i haven’t seen one of those libraries work well with async code. but if it were integrated with the executor it might work.
f