RFR: 1587: Adding review comments should not mean approval status change [v2]

Zhao Song zsong at openjdk.org
Thu Oct 20 20:12:39 UTC 2022


On Thu, 20 Oct 2022 20:06:32 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> An instance of `PullRequest` is not guaranteed to reflect the current server state of the pr, it should always be considered a snapshot. This property of a `PullRequest` wasn't properly reflected in the `TestPullRequest` implementation until recently, with the explicit `TestPullRequestStore` object that represents the server side state.
> 
> In test code, instead of explicitly fetching an updated snapshot of a PR, you can access the store directly to inspect the state through `pr.store()`. Most old test code has not been updated to use this. Note that the `TestPullRequestStore` doesn't have as many convenience methods for all the data as `TestPullRequest` has, so it may be a bit clunky, at least for labels. You could always add a better accessor (in `TestIssueStore` in this case) to help with that.

Got it! Thanks for explaining this to me. I will use `pr.store()` to do the test.

-------------

PR: https://git.openjdk.org/skara/pull/1399


More information about the skara-dev mailing list