summaryrefslogtreecommitdiffstats
path: root/integrations/repo_search_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-09-07 23:05:08 +0800
committerGitHub <noreply@github.com>2020-09-07 23:05:08 +0800
commit91e7ad569ac9590b521e5c4fdfb2162f528db49f (patch)
tree675316438ca6d716b87849dcf23f5ecd772176d5 /integrations/repo_search_test.go
parenta722dd72db7fb6efd9ec0bf730d6b2364ef6337c (diff)
downloadgitea-91e7ad569ac9590b521e5c4fdfb2162f528db49f.tar.gz
gitea-91e7ad569ac9590b521e5c4fdfb2162f528db49f.zip
Add queue for code indexer (#10332)
* Add queue for code indexer * Fix lint * Fix test * Fix lint * Fix bug * Fix bug * Fix lint * Add noqueue * Fix tests * Rename noqueue to immediate
Diffstat (limited to 'integrations/repo_search_test.go')
-rw-r--r--integrations/repo_search_test.go13
1 files changed, 2 insertions, 11 deletions
diff --git a/integrations/repo_search_test.go b/integrations/repo_search_test.go
index 701013735c..6f2ee37460 100644
--- a/integrations/repo_search_test.go
+++ b/integrations/repo_search_test.go
@@ -7,7 +7,6 @@ package integrations
import (
"net/http"
"testing"
- "time"
"code.gitea.io/gitea/models"
code_indexer "code.gitea.io/gitea/modules/indexer/code"
@@ -62,14 +61,6 @@ func testSearch(t *testing.T, url string, expected []string) {
assert.EqualValues(t, expected, filenames)
}
-func executeIndexer(t *testing.T, repo *models.Repository, op func(*models.Repository, ...chan<- error)) {
- waiter := make(chan error, 1)
- op(repo, waiter)
-
- select {
- case err := <-waiter:
- assert.NoError(t, err)
- case <-time.After(1 * time.Minute):
- assert.Fail(t, "Repository indexer took too long")
- }
+func executeIndexer(t *testing.T, repo *models.Repository, op func(*models.Repository)) {
+ op(repo)
}