We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6629c40 commit 973ff8fCopy full SHA for 973ff8f
adapter/redis_test.go
@@ -3,6 +3,7 @@ package adapter
3
import (
4
"context"
5
"testing"
6
+ "time"
7
8
"github.com/redis/go-redis/v9"
9
"github.com/stretchr/testify/assert"
@@ -67,9 +68,10 @@ func TestRedis_follower_redirect_node_set_get_deleted(t *testing.T) {
67
68
assert.NoError(t, res3.Err())
69
assert.Equal(t, int64(1), res3.Val())
70
- res4 := rdb.Get(ctx, string(key))
71
- assert.Equal(t, redis.Nil, res4.Err())
72
- assert.Equal(t, "", res4.Val())
+ assert.Eventually(t, func() bool {
+ res4 := rdb.Get(ctx, string(key))
73
+ return res4.Err() == redis.Nil && res4.Val() == ""
74
+ }, 2*time.Second, 50*time.Millisecond)
75
}
76
77
func TestRedis_leader_keys(t *testing.T) {
0 commit comments