MCPcopy Create free account
hub / github.com/coder/coder / TestRetry_SuccessOnFirstTry

Function TestRetry_SuccessOnFirstTry

coderd/x/chatd/chatretry/chatretry_test.go:123–133  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

121}
122
123func TestRetry_SuccessOnFirstTry(t *testing.T) {
124 t.Parallel()
125
126 calls := 0
127 err := chatretry.Retry(context.Background(), func(_ context.Context) error {
128 calls++
129 return nil
130 }, nil)
131 require.NoError(t, err)
132 require.Equal(t, 1, calls)
133}
134
135func TestRetry_TransientThenSuccess(t *testing.T) {
136 t.Parallel()

Callers

nothing calls this directly

Calls 2

RetryFunction · 0.92
EqualMethod · 0.45

Tested by

no test coverage detected