valkey-io / valkey-py

Valkey Python client based on a fork of redis-py
MIT License
71 stars 9 forks source link

tests: increase fudge factors #88

Closed aiven-sal closed 2 months ago

aiven-sal commented 2 months ago

Description of change

Make some tests less likely to fail. Maybe we should just drop these tests. But let's see if we can make them less flaky.

codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 75.12%. Comparing base (f520399) to head (08e8f9e).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #88 +/- ## ======================================= Coverage 75.12% 75.12% ======================================= Files 132 132 Lines 34400 34400 ======================================= Hits 25842 25842 Misses 8558 8558 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

aiven-sal commented 2 months ago

You can't guarantee that a blocking operation with a timeout will not take more than timeout+delta, unless you have an RTOS and you are not using python. If you rely on the fact that this timeouts will return "on time" you already have a bug in your code.

In fact, I'm not sure it makes any sense at all to check how much time passed in those tests, but if this commit fixes the flaky tests we can leave them. If they fail again, I'll just drop them completely. The actual amount of time that those operation take is completely outside of our control and influenced by stuff (i.e. other processes running on the machine) that have nothing to do with valkey-py.