Skip to content

Commit 544bdb2

Browse files
committed
fix(doctest): simulate some delay
1 parent f6f892d commit 544bdb2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doctests/lpush_lrange_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package example_commands_test
55
import (
66
"context"
77
"fmt"
8+
"time"
89

910
"github.com/redis/go-redis/v9"
1011
)
@@ -33,6 +34,7 @@ func ExampleClient_LPush_and_lrange() {
3334
}
3435

3536
fmt.Println(listSize)
37+
time.Sleep(10 * time.Millisecond) // Simulate some delay
3638

3739
value, err := rdb.LRange(ctx, "my_bikes", 0, -1).Result()
3840
if err != nil {

0 commit comments

Comments
 (0)