I would like to unit test the device auth code. But time and unit testing do not mix.
Its very easy to create flaky tests that only work sometimes. (Literally in this case).
So i have create this small class that allows me to override the current time for my code so that test tokens expire in 60 sec without having tests that need over 60 sec to run.
I would like to unit test the device auth code. But time and unit testing do not mix.
Its very easy to create flaky tests that only work sometimes. (Literally in this case).
So i have create this small class that allows me to override the current time for my code so that test tokens expire in 60 sec without having tests that need over 60 sec to run.