3 ms·
It really depends. You might want to test something that requires days/weeks expiration. I would agree that the Clock interface is a bit large. In personal pro
by zalmoxes 10y ago
It really depends. You might want to test something that requires days/weeks expiration.
I would agree that the Clock interface is a bit large. In personal projects I prefer to just have something simple like
timer func() time.Time
- weberc2 10y agoI don't understand your argument. What's special about a days/weeks that would prevent you from shortening this value for your tests? In other words, if I want to test my timeout logic, it should be independent of the timeout value, so I should be free to use a shorter timeout value in my timeout tests.