diff options
author | 2023-09-18 13:45:10 +0100 | |
---|---|---|
committer | 2023-09-18 13:45:10 +0100 | |
commit | ba0a31d224a695491b1001cca5dfe88a8dc400ab (patch) | |
tree | b2d7370ccf474fec8cbec07940f303b4a2aed4bf /internal/paging/page_test.go | |
parent | [chore] bump bun (and related libraries) versions to v1.1.16 (#2209) (diff) | |
download | gotosocial-ba0a31d224a695491b1001cca5dfe88a8dc400ab.tar.xz |
[bugfix] fix flakey paging test (#2210)
Diffstat (limited to 'internal/paging/page_test.go')
-rw-r--r-- | internal/paging/page_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/paging/page_test.go b/internal/paging/page_test.go index 01cc74d9f..9eeb90882 100644 --- a/internal/paging/page_test.go +++ b/internal/paging/page_test.go @@ -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] |