mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-28 11:21:00 +00:00
[bugfix] fix flakey paging test (#2210)
This commit is contained in:
parent
50b713e37a
commit
ba0a31d224
1 changed files with 2 additions and 2 deletions
|
@ -64,7 +64,7 @@ func TestPage(t *testing.T) {
|
||||||
out := c.Page.Page(c.Input)
|
out := c.Page.Page(c.Input)
|
||||||
|
|
||||||
// Log the results for case of error returns.
|
// 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.
|
// Check paged output is as expected.
|
||||||
if !slices.Equal(out, c.Expect) {
|
if !slices.Equal(out, c.Expect) {
|
||||||
|
@ -110,7 +110,7 @@ var cases = []Case{
|
||||||
// Select random parameters in slice.
|
// Select random parameters in slice.
|
||||||
minIdx := randRd.Intn(len(ids))
|
minIdx := randRd.Intn(len(ids))
|
||||||
maxIdx := randRd.Intn(len(ids))
|
maxIdx := randRd.Intn(len(ids))
|
||||||
limit := randRd.Intn(len(ids))
|
limit := randRd.Intn(len(ids)) + 1
|
||||||
|
|
||||||
// Select the boundaries.
|
// Select the boundaries.
|
||||||
minID := ids[minIdx]
|
minID := ids[minIdx]
|
||||||
|
|
Loading…
Reference in a new issue