aboutsummaryrefslogtreecommitdiffstats
path: root/tests/integration/api_repo_file_create_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/api_repo_file_create_test.go')
-rw-r--r--tests/integration/api_repo_file_create_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/api_repo_file_create_test.go b/tests/integration/api_repo_file_create_test.go
index 0a7f37facb..df0fc3dd05 100644
--- a/tests/integration/api_repo_file_create_test.go
+++ b/tests/integration/api_repo_file_create_test.go
@@ -130,7 +130,7 @@ func BenchmarkAPICreateFileSmall(b *testing.B) {
repo1 := unittest.AssertExistsAndLoadBean(b, &repo_model.Repository{ID: 1}) // public repo
b.ResetTimer()
- for n := 0; n < b.N; n++ {
+ for n := 0; b.Loop(); n++ {
treePath := fmt.Sprintf("update/file%d.txt", n)
_, _ = createFileInBranch(user2, repo1, treePath, repo1.DefaultBranch, treePath)
}
@@ -145,7 +145,7 @@ func BenchmarkAPICreateFileMedium(b *testing.B) {
repo1 := unittest.AssertExistsAndLoadBean(b, &repo_model.Repository{ID: 1}) // public repo
b.ResetTimer()
- for n := 0; n < b.N; n++ {
+ for n := 0; b.Loop(); n++ {
treePath := fmt.Sprintf("update/file%d.txt", n)
copy(data, treePath)
_, _ = createFileInBranch(user2, repo1, treePath, repo1.DefaultBranch, treePath)