mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-04 13:07:34 +00:00
fdc1d613da
`TestPullView_CodeOwner/First Pull Request` called
`PullRequestCodeOwnersReview` directly and asserted it returned one
notifier. That return value holds only the review requests that call
creates. But the push (by `files_service.ChangeRepoFiles`) to the PR
branch already triggers the same function asynchronously through
`AddTestPullRequestTask`, which makes `PullRequestCodeOwnersReview`
return an empty slice and the test then fails with
```
Error: "[]" should have 1 item(s), but has 0
```
Fix: make `require.Eventually` wait for the review request to exist.
---------
Co-authored-by: silverwind <me@silverwind.io>