News for hackers. Stuff that matters.
Re:Mocking time and testing event loops in Go by devonkim on Monday May 25, 2020 @08:48AM (#23300409)
Not a mock obviously but in the interest of getting things done on schedule I’d suggest running tests in a container with https://github.com/wolfcw/libfaketime and orchestrating edge cases like leap seconds external to the test suite itself.
Re:Mocking time and testing event loops in Go by TheDong on Monday May 25, 2020 @10:46AM (#23301605)
Interestingly, libfaketime probably won't work in go due to their allergy to using libc on linux. I believe they only use syscalls directly for time-related functionality, meaning that any LD_PRELOAD hack won't work.