MCPcopy Create free account
hub / github.com/imroc/req / TestAddRetryHook

Function TestAddRetryHook

retry_test.go:52–60  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

50}
51
52func TestAddRetryHook(t *testing.T) {
53 test := "test1"
54 testRetry(t, func(r *Request) {
55 r.AddRetryHook(func(resp *Response, err error) {
56 test = "test2"
57 })
58 })
59 tests.AssertEqual(t, "test2", test)
60}
61
62func TestRetryOverride(t *testing.T) {
63 c := tc().

Callers

nothing calls this directly

Calls 3

AssertEqualFunction · 0.92
testRetryFunction · 0.85
AddRetryHookMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…