summaryrefslogtreecommitdiffstats
path: root/modules/indexer/issues/bleve_test.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-08-11 22:05:34 +0200
committerGitHub <noreply@github.com>2020-08-11 22:05:34 +0200
commit74bd9691c685942798f2761607731697498ceeae (patch)
tree531d661263b839ccf8aa6af73bfb6710984f0dd9 /modules/indexer/issues/bleve_test.go
parent[skip ci] Updated translations via Crowdin (diff)
downloadforgejo-74bd9691c685942798f2761607731697498ceeae.tar.xz
forgejo-74bd9691c685942798f2761607731697498ceeae.zip
Re-attempt to delete temporary upload if the file is locked by another process (#12447)
Replace all calls to os.Remove/os.RemoveAll by retrying util.Remove/util.RemoveAll and remove circular dependencies from util. Fix #12339 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'modules/indexer/issues/bleve_test.go')
-rw-r--r--modules/indexer/issues/bleve_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/indexer/issues/bleve_test.go b/modules/indexer/issues/bleve_test.go
index 234da076cd..a8b6e8138b 100644
--- a/modules/indexer/issues/bleve_test.go
+++ b/modules/indexer/issues/bleve_test.go
@@ -6,9 +6,9 @@ package issues
import (
"io/ioutil"
- "os"
"testing"
+ "code.gitea.io/gitea/modules/util"
"github.com/stretchr/testify/assert"
)
@@ -19,7 +19,7 @@ func TestBleveIndexAndSearch(t *testing.T) {
assert.Fail(t, "Unable to create temporary directory")
return
}
- defer os.RemoveAll(dir)
+ defer util.RemoveAll(dir)
indexer := NewBleveIndexer(dir)
defer indexer.Close()