mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Refactor tests (#26464)
1. Give the global variable clear names 2. Use generic parameter for `onGiteaRun`
This commit is contained in:
		@@ -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()
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user