@@ -871,7 +871,7 @@ var testHash = func(t *testing.T, configs map[string]string) {
871
871
t .Run ("Test bug with large value after compaction" , func (t * testing.T ) {
872
872
testKey := "test-hash-1"
873
873
require .NoError (t , rdb .Del (ctx , testKey ).Err ())
874
-
874
+
875
875
src := rand .NewSource (time .Now ().UnixNano ())
876
876
dd := make ([]byte , 5000 )
877
877
for i := 1 ; i <= 50 ; i ++ {
@@ -881,16 +881,16 @@ var testHash = func(t *testing.T, configs map[string]string) {
881
881
key := util .RandString (10 , 20 , util .Alpha )
882
882
require .NoError (t , rdb .HSet (ctx , testKey , key , string (dd )).Err ())
883
883
}
884
-
884
+
885
885
require .EqualValues (t , 50 , rdb .HLen (ctx , testKey ).Val ())
886
886
require .Len (t , rdb .HGetAll (ctx , testKey ).Val (), 50 )
887
887
require .Len (t , rdb .HKeys (ctx , testKey ).Val (), 50 )
888
888
require .Len (t , rdb .HVals (ctx , testKey ).Val (), 50 )
889
-
889
+
890
890
require .NoError (t , rdb .Do (ctx , "COMPACT" ).Err ())
891
-
891
+
892
892
time .Sleep (5 * time .Second )
893
-
893
+
894
894
require .EqualValues (t , 50 , rdb .HLen (ctx , testKey ).Val ())
895
895
require .Len (t , rdb .HGetAll (ctx , testKey ).Val (), 50 )
896
896
require .Len (t , rdb .HKeys (ctx , testKey ).Val (), 50 )
0 commit comments