codecrafters-io / build-your-own-redis

Definition for the redis challenge.
https://app.codecrafters.io/courses/redis/overview
MIT License
108 stars 30 forks source link

Add more checks on elapsed time in `test_wait.go` #136

Open ryan-gang opened 4 months ago

ryan-gang commented 4 months ago

Currently we don't check the time elapsed when the WAIT command is supposed to return early. But, as highlighted by @andy1li, this might lead to cases where user never implements WAIT properly, just sleeps for time_duration, and returns.

This can be mitigated by adding checks on elapsed_time in cases where WAIT returns early.

linear[bot] commented 4 months ago

CC-1055 Add more checks on elapsed time in `test_wait.go`