]> source.dussan.org Git - gitea.git/commit
Prevent intermittent failures in RepoIndexerTest (#19225 #19229) (#19228)
authorzeripath <art27@cantab.net>
Sun, 27 Mar 2022 23:01:53 +0000 (00:01 +0100)
committerGitHub <noreply@github.com>
Sun, 27 Mar 2022 23:01:53 +0000 (01:01 +0200)
commitefd34d0d7d76aac829966575a47c09cecc7a7ab3
treeaf9b3d42808dee99108a5c7e1b78c265739eba92
parent2ec2935f78f827a433cc03da25e05f22684f86a6
Prevent intermittent failures in RepoIndexerTest (#19225 #19229) (#19228)

Backport #19225
Backport #19229

The RepoIndexerTest is failing with considerable frequency due to a race inherrent in
its design. This PR adjust this test to avoid the reliance on waiting for the populate
repo indexer to run and forcibly adds the repo to the queue. It then flushes the queue.

It may be worth separating out the tests somewhat by testing the Index function
directly away from the queue however, this forceful method should solve the current
problem.

Fix #19162

Signed-off-by: Andrew Thornton <art27@cantab.net>
modules/indexer/stats/indexer_test.go