RFR: 1589: Improve TestIssue and TestPullRequest [v2]

Erik Joelsson erikj at openjdk.org
Fri Sep 9 16:40:21 UTC 2022


On Fri, 9 Sep 2022 14:54:33 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

>> Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Unused imports
>
> bots/pr/src/test/java/org/openjdk/skara/bots/pr/CheckTests.java line 233:
> 
>> 231:             // Check that the review is flagged as stale
>> 232:             TestBotRunner.runPeriodicItems(checkBot);
>> 233:             authorPr = author.pullRequest(authorPr.id());
> 
> What was this line even supposed to accomplish? Some kind of reload?
> 
> Edit: I think I get it now.

I'm happy to try to clarify. With the old `TestPullRequest` implementation, some data was part of a snapshot and some wasn't, so fetching the PR again caused a reload and was necessary to see some kinds of changes that a bot would make. This is even more true with the new implementation, but since we have an explicit object representing the server side state of the PR, I think it's better if test code uses that explicitly to inspect state.

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

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


More information about the skara-dev mailing list