MCPcopy Create free account
hub / github.com/cloud-native-go/examples / TestRetry

Function TestRetry

ch04/retry_test.go:39–45  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

37}
38
39func TestRetry(t *testing.T) {
40 ctx := context.Background()
41 r := Retry(EmulateTransientError, 5, 2*time.Second)
42 res, err := r(ctx)
43
44 fmt.Println(res, err)
45}

Callers

nothing calls this directly

Calls 1

RetryFunction · 0.85

Tested by

no test coverage detected