Add TestCase.create_many_review_requests().
Review Request #12326 — Created June 2, 2022 and submitted — Latest diff uploaded
This is a unit test helper method that can batch-create many review
requests at the same time. This is much faster than calling
create_review_request()
in a loop, and performs as many operations in
batches as possible.Not all state or operations can be set in this mode. For example, review
requests can't be published, though they can be set to be public. If
specific review requests need to have operations performed, they can be
called separately once created.When marking review requests public, this will also take care to set the
counters on any review groups, reviewers, or the owner, as appropriate.
Made use of this in some upcoming unit tests that need lots of review
requests, and are sensitive to the counter fields.