Closed coorasse closed 1 year ago
Of course, I can do:
SECOND_METHOD_TIMEOUT = 1.minute
def second_method
Timeout(SECOND_METHOD_TIMEOUT) do
first_method
end
end
and mock it:
stub_const('SECOND_METHOD_TIMEOUT', 0.1.second)
sorry I didn't have any suggestions on this that came to mind and I guess nobody else did either. I'm going to close this for lack of activity. Feel free to re-open if you need to.
Ok, I really did not find a good name for this issue, sorry. Please help me out here.
Situation: I have a method that sleeps 10 minutes
The method is wrapped in a Timeout block:
I want to test that the Timeout works so I do:
I want my time to go faster. I don't want to wait 1 minute but maybe make it go 100x faster. I thought of wrapping it into:
but this does not make the time to actually go faster. I also understand why. But I wonder if there's a solution for that.