mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-12-22 18:22:11 +00:00
[bugfix] fix flakey paging test (#2210)
This commit is contained in:
parent
50b713e37a
commit
ba0a31d224
|
@ -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 @@ func TestPage(t *testing.T) {
|
|||
// 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]
|
||||
|
|
Loading…
Reference in a new issue