go-grpc-middleware
go-grpc-middleware copied to clipboard
Introduce Mocking of time dependent tests
Currently, some tests such as retry
logic use real-time based tests, in which the tests pass/fails, depending on the time taken by the local computer to run that logic, and then check if the time-bound is valid or not. However, on configuring the tests on Github Actions, it is seen that the tests take much longer to execute which creates unnecessary long time to execute, resulting in some tests failing due to the machine taking a long time to execute.
A Solution would be to mock the time clock used in the tests with a mocked time clock, which would make sure that the tests don't fail due to the differences in time taken for execution.
Do you have any specific tests in mind?