Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'workhorse/internal/testhelper/testhelper.go')
-rw-r--r--workhorse/internal/testhelper/testhelper.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/workhorse/internal/testhelper/testhelper.go b/workhorse/internal/testhelper/testhelper.go
index c21d60bdf36..6c944def92d 100644
--- a/workhorse/internal/testhelper/testhelper.go
+++ b/workhorse/internal/testhelper/testhelper.go
@@ -11,7 +11,6 @@ import (
"regexp"
"runtime"
"testing"
- "time"
"github.com/golang-jwt/jwt/v5"
"github.com/stretchr/testify/require"
@@ -154,19 +153,6 @@ type UploadClaims struct {
jwt.RegisteredClaims
}
-func Retry(t testing.TB, timeout time.Duration, fn func() error) {
- t.Helper()
- start := time.Now()
- var err error
- for ; time.Since(start) < timeout; time.Sleep(time.Millisecond) {
- err = fn()
- if err == nil {
- return
- }
- }
- t.Fatalf("test timeout after %v; last error: %v", timeout, err)
-}
-
func SetupStaticFileHelper(t *testing.T, fpath, content, directory string) string {
cwd, err := os.Getwd()
require.NoError(t, err, "get working directory")