Skip to content

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jjz921024 committed Aug 11, 2024
1 parent 21c24d5 commit 638395b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/gocase/unit/type/hash/hash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ var testHash = func(t *testing.T, configs map[string]string) {
t.Run("Test bug with large value after compaction", func(t *testing.T) {
testKey := "test-hash-1"
require.NoError(t, rdb.Del(ctx, testKey).Err())

src := rand.NewSource(time.Now().UnixNano())
dd := make([]byte, 5000)
for i := 1; i <= 50; i++ {
Expand All @@ -881,16 +881,16 @@ var testHash = func(t *testing.T, configs map[string]string) {
key := util.RandString(10, 20, util.Alpha)
require.NoError(t, rdb.HSet(ctx, testKey, key, string(dd)).Err())
}

require.EqualValues(t, 50, rdb.HLen(ctx, testKey).Val())
require.Len(t, rdb.HGetAll(ctx, testKey).Val(), 50)
require.Len(t, rdb.HKeys(ctx, testKey).Val(), 50)
require.Len(t, rdb.HVals(ctx, testKey).Val(), 50)

require.NoError(t, rdb.Do(ctx, "COMPACT").Err())

time.Sleep(5 * time.Second)

require.EqualValues(t, 50, rdb.HLen(ctx, testKey).Val())
require.Len(t, rdb.HGetAll(ctx, testKey).Val(), 50)
require.Len(t, rdb.HKeys(ctx, testKey).Val(), 50)
Expand Down

0 comments on commit 638395b

Please sign in to comment.