Tech
Testing scheduled jobs using faketime
Recently, I was tasked with testing some scheduled exports to investigate a defect. Unit tests should have caught it, but something else was going on. I had to simulate a real execution in a container by faking its internal clock.
This is where I utilized faketime .
faketime is a tool that manipulates system time for a specific program without changing the system's actual time. It works by intercepting the system calls a program makes to get the current date and time, allowing you to ru...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to