diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-08-13 00:30:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-12 16:30:16 +0000 |
commit | c28e29fd94032aa2804b57512115cd9c5fe76398 (patch) | |
tree | 3f04a87f807eb094e003c2c8026a077301edb423 /tests/integration/benchmarks_test.go | |
parent | bcccf4c0d6149e5e7382226a191abd54848f9416 (diff) | |
download | gitea-c28e29fd94032aa2804b57512115cd9c5fe76398.tar.gz gitea-c28e29fd94032aa2804b57512115cd9c5fe76398.zip |
Refactor tests (#26464)
1. Give the global variable clear names
2. Use generic parameter for `onGiteaRun`
Diffstat (limited to 'tests/integration/benchmarks_test.go')
-rw-r--r-- | tests/integration/benchmarks_test.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/integration/benchmarks_test.go b/tests/integration/benchmarks_test.go index 2f91f8273e..7a882fe836 100644 --- a/tests/integration/benchmarks_test.go +++ b/tests/integration/benchmarks_test.go @@ -24,9 +24,7 @@ func StringWithCharset(length int, charset string) string { } func BenchmarkRepoBranchCommit(b *testing.B) { - onGiteaRunTB(b, func(t testing.TB, u *url.URL) { - b := t.(*testing.B) - + onGiteaRun(b, func(b *testing.B, u *url.URL) { samples := []int64{1, 2, 3} b.ResetTimer() |