Skip to content

Commit

Permalink
fix: test case
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulPancake committed Jun 24, 2024
1 parent e3cc0ff commit 862c81a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ func TestMGetCache(t *testing.T) {
for i := range keys {
keys[i] = strconv.Itoa(i)
}
m.DoMultiCacheFn = func(multi ...CacheableTTL) *redisresults {
result := make([]RedisResult, len(multi))
m.DoMultiFn = func(cmd ...Completed) *redisresults {
result := make([]RedisResult, len(cmd))
for i, key := range keys {
if !reflect.DeepEqual(multi[i].Cmd.Commands(), []string{"GET", key}) || multi[i].TTL != 100 {
t.Fatalf("unexpected command %v", multi)
if !reflect.DeepEqual(cmd[i].Commands(), []string{"GET", key}) {
t.Fatalf("unexpected command %v", cmd)
return nil
}
result[i] = newResult(RedisMessage{typ: '+', string: key}, nil)
Expand Down

0 comments on commit 862c81a

Please sign in to comment.