[bugfix] fix flakey paging test (#2210)

This commit is contained in:
kim 2023-09-18 13:45:10 +01:00 committed by GitHub
parent 50b713e37a
commit ba0a31d224
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,7 +64,7 @@ func TestPage(t *testing.T) {
out := c.Page.Page(c.Input)
// Log the results for case of error returns.
t.Logf("\ninput=%v\noutput=%v\nexpected=%v", c.Input, out, c.Expect)
t.Logf("%s\npage=%+v input=%v expect=%v output=%v", c.Name, c.Page, c.Input, c.Expect, out)
// Check paged output is as expected.
if !slices.Equal(out, c.Expect) {
@ -110,7 +110,7 @@ var cases = []Case{
// Select random parameters in slice.
minIdx := randRd.Intn(len(ids))
maxIdx := randRd.Intn(len(ids))
limit := randRd.Intn(len(ids))
limit := randRd.Intn(len(ids)) + 1
// Select the boundaries.
minID := ids[minIdx]