ReactiveListOperations left/right pop operations fail with Duration with fractions of second
According to documentation, leftPop/rightPop methods expect to get Duration parameter ZERO or >= 1 second.
Failure use case: pass Duration with seconds >= 1 second, and nanos > 0. Example:
reactiveRedisTemplate.opsForList().leftPop(key, Duration.ofMillis(10100L));
Fails with exception
java.lang.IllegalArgumentException: Duration must be either zero or greater or equal to 1 second
The issue is caused by wrong implementation of DefaultReactiveListOperations.isZeroOrGreaterOneSecond()
Thank you @ai91 for bringing this up. We'll look into it.
The entire requirement forcing a timeout that is > 1 sec. limits usage of Redis API allowing the timeout to be a
double value specifying the maximum number of seconds to block
We'll need a broader change that also switches the command implementations to use double instead of the current long. The switch from long to double is in since Redis 6. Prior Redis versions are already EOL so I think it's fine to change the current implementation.