Skip to content

Commit

Permalink
fix(pd/util): Try to fix test TestSortAndUnique causing "marked fre…
Browse files Browse the repository at this point in the history
…… (#910)

fix(pd/util): Try to fix test `TestSortAndUnique` causing "marked free object" in GO 1.19

Signed-off-by: Ning Yu <[email protected]>
  • Loading branch information
Chillax-0v0 authored Aug 9, 2023
1 parent 79aba30 commit 67b61d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pd/pkg/util/typeutil/slice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ func TestSortAndUnique(t *testing.T) {
re := require.New(t)

l := SortAndUnique(tt.args.l, tt.args.less)
re.Equal(tt.want, l)
re.Len(l, len(tt.want))
for i := range l {
re.Equal(tt.want[i], l[i])
}
})
}
}
Expand Down

0 comments on commit 67b61d4

Please sign in to comment.