aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/benchmarks_test.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-12-08 01:14:50 +0000
committerGitHub <noreply@github.com>2019-12-08 01:14:50 +0000
commit3da6d256f47604fc5b8f3b63d595d8e230c8ffae (patch)
tree96efc990ae033eb2907b9cb65006a0d52a9297c1 /integrations/benchmarks_test.go
parent37e10d4543c1e516e1a721d72c0054fefceb9499 (diff)
downloadgitea-3da6d256f47604fc5b8f3b63d595d8e230c8ffae.tar.gz
gitea-3da6d256f47604fc5b8f3b63d595d8e230c8ffae.zip
Missed defer prepareTestEnv (#9285)
* onGiteaRun should defer the cleanup from prepareTestEnv * Some more missed defers
Diffstat (limited to 'integrations/benchmarks_test.go')
-rw-r--r--integrations/benchmarks_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/integrations/benchmarks_test.go b/integrations/benchmarks_test.go
index 4be3008f52..7c7aff994e 100644
--- a/integrations/benchmarks_test.go
+++ b/integrations/benchmarks_test.go
@@ -25,7 +25,7 @@ func BenchmarkRepo(b *testing.B) {
{url: "https://github.com/golang/go.git", name: "go", skipShort: true},
{url: "https://github.com/torvalds/linux.git", name: "linux", skipShort: true},
}
- prepareTestEnv(b)
+ defer prepareTestEnv(b)()
session := loginUser(b, "user2")
b.ResetTimer()
@@ -75,7 +75,7 @@ func StringWithCharset(length int, charset string) string {
func BenchmarkRepoBranchCommit(b *testing.B) {
samples := []int64{1, 3, 15, 16}
- prepareTestEnv(b)
+ defer prepareTestEnv(b)()
b.ResetTimer()
for _, repoID := range samples {