RFR: 1633: PullRequestPollerTests#queryPaddingComment fails

Erik Helin ehelin at openjdk.org
Thu Oct 13 13:44:11 UTC 2022


On Tue, 11 Oct 2022 20:12:10 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> A combination of changes in SKARA-1584 and SKARA-1606 is causing a test failure. The problem is in `TestPullRequest::review`, where we will sometimes (most often) return the internal ArrayList<Review> from the underlying store object. This is causing TestPullRequest::snapshot to not return a pure snapshot, but instead something that gets updated when the store is updated, defeating the whole idea of the snapshot.
> 
> The fix is to wrap the return value with a `List::copyOf`. I'm also applying this to `Issue::comments` as that's also part of the snapshot and using unmodifiable collections is usually preferable.

Looks good, thanks for fixing!

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

Marked as reviewed by ehelin (Reviewer).

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


More information about the skara-dev mailing list