MCPcopy
hub / github.com/etcd-io/etcd / TestBackoff

Function TestBackoff

client/v3/client_test.go:169–181  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

167}
168
169func TestBackoff(t *testing.T) {
170 backoffWaitBetween := 100 * time.Millisecond
171 cfg := Config{
172 Endpoints: []string{"127.0.0.1:12345"},
173 BackoffWaitBetween: backoffWaitBetween,
174 }
175 c, err := NewClient(t, cfg)
176 require.NoError(t, err)
177 require.NotNil(t, c)
178 defer c.Close()
179
180 require.Equal(t, backoffWaitBetween, c.cfg.BackoffWaitBetween)
181}
182
183func TestBackoffJitterFraction(t *testing.T) {
184 backoffJitterFraction := float64(0.9)

Callers

nothing calls this directly

Calls 3

CloseMethod · 0.95
NewClientFunction · 0.70
EqualMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…