Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
  • Loading branch information
wjhuang2016 authored and ti-chi-bot committed Jan 30, 2023
1 parent 0e6afd1 commit 8a15454
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions server/http_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,16 +539,16 @@ partition by range (a)

func decodeKeyMvcc(closer io.ReadCloser, t *testing.T, valid bool) {
decoder := json.NewDecoder(closer)
var data helper.MvccKV
var data []helper.MvccKV
err := decoder.Decode(&data)
require.NoError(t, err)
if valid {
require.NotNil(t, data.Value.Info)
require.Greater(t, len(data.Value.Info.Writes), 0)
require.NotNil(t, data[0].Value.Info)
require.Greater(t, len(data[0].Value.Info.Writes), 0)
} else {
require.Nil(t, data.Value.Info.Lock)
require.Nil(t, data.Value.Info.Writes)
require.Nil(t, data.Value.Info.Values)
require.Nil(t, data[0].Value.Info.Lock)
require.Nil(t, data[0].Value.Info.Writes)
require.Nil(t, data[0].Value.Info.Values)
}
}

Expand Down

0 comments on commit 8a15454

Please sign in to comment.