diff options
Diffstat (limited to 'modules/indexer')
-rw-r--r-- | modules/indexer/issues/indexer.go | 2 | ||||
-rw-r--r-- | modules/indexer/issues/indexer_test.go | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/indexer/issues/indexer.go b/modules/indexer/issues/indexer.go index 4db5091762..8530210628 100644 --- a/modules/indexer/issues/indexer.go +++ b/modules/indexer/issues/indexer.go @@ -110,7 +110,7 @@ func InitIssueIndexer(syncReindex bool) { return } - iData := make([]*IndexerData, 0, setting.Indexer.IssueQueueBatchNumber) + iData := make([]*IndexerData, 0, len(data)) for _, datum := range data { indexerData, ok := datum.(*IndexerData) if !ok { diff --git a/modules/indexer/issues/indexer_test.go b/modules/indexer/issues/indexer_test.go index 866e3cc7c9..ba35e37fd8 100644 --- a/modules/indexer/issues/indexer_test.go +++ b/modules/indexer/issues/indexer_test.go @@ -34,12 +34,12 @@ func TestBleveSearchIssues(t *testing.T) { assert.Fail(t, "Unable to create temporary directory: %v", err) return } - oldQueueDir := setting.Indexer.IssueQueueDir + + setting.Cfg.Section("queue.issue_indexer").Key("DATADIR").MustString(path.Join(tmpIndexerDir, "issues.queue")) + oldIssuePath := setting.Indexer.IssuePath - setting.Indexer.IssueQueueDir = path.Join(tmpIndexerDir, "issues.queue") setting.Indexer.IssuePath = path.Join(tmpIndexerDir, "issues.queue") defer func() { - setting.Indexer.IssueQueueDir = oldQueueDir setting.Indexer.IssuePath = oldIssuePath util.RemoveAll(tmpIndexerDir) }() |