-
Notifications
You must be signed in to change notification settings - Fork 124
Closed
Milestone
Description
The Walker
class provides the way to iterate over large issue count without consuming too much memory in the process. It does so by using so called paginated query
concept, where:
- an
Api::search
call is made to get first 50 issues - when user have iterated over these issues, then an
Api::search
call is made to get next 50 issues - above steps are repeated until no more issues is found
This is perfectly fine from user point of view, but a nightmare from tester point of view (mine), because to test this we need to generate at least 100 fake issue responses to see if paginated query works as expected.
To make things more testable I'm proposing to add optional $per_page
parameter to Walker
class constructor (this is constructor parameter and not a setter method to avoid mess with changing per page in the middle of issue iteration), that:
- will be
null
by default - when specified the value is used
- when not specified the default 50 is used
I can't imagine any another reasons for making per page configurable except for testing though.
Metadata
Metadata
Assignees
Labels
No labels