News for hackers. Stuff that matters.
Re:Mocking time and testing event loops in Go by jniedrauer on Monday May 25, 2020 @12:04PM (#23302350)
I recently ran into a situation where I had to test some complex scheduling logic for edge case handling (DST, leap year, new year, etc). Most of the actual time comparisons were offloaded to a database engine, so I was able to mock various scenarios with libfaketime. It was definitely a pain to not be able to mock time in Go using libfaketime though. It's a really rare requirement, but when it does pop up, it's hard to do without.

There are no comments on this comment yet.