TestTryFastFailOpen_DownWithinWindow verifies that during the cooldown window (downSince fresh), ALL callers fast-path — no probes are elected until probeInterval elapses since the down transition.
(t *testing.T)
| 351 | // window (downSince fresh), ALL callers fast-path — no probes are elected |
| 352 | // until probeInterval elapses since the down transition. |
| 353 | func TestTryFastFailOpen_DownWithinWindow(t *testing.T) { |
| 354 | t.Parallel() |
| 355 | fc := &fakeConnector{id: "test"} |
| 356 | s := newTestStrategyWith(t, fc, true) |
| 357 | |
| 358 | s.markConnectorDown() |
| 359 | // downSince is set by markConnectorDown to time.Now(), so we're well |
| 360 | // inside the probe interval. |
| 361 | |
| 362 | for i := 0; i < 50; i++ { |
| 363 | u := s.tryFastFailOpen() |
| 364 | require.NotNil(t, u, "every caller within the probe window must fast-path; iter=%d", i) |
| 365 | assert.Equal(t, "emergency-failopen", u.Id) |
| 366 | } |
| 367 | } |
| 368 | |
| 369 | // TestGetWithRetries_SkipsRetryOnNotReady verifies the retry loop aborts |
| 370 | // immediately on data.ErrConnectorNotReady. Retrying during a known |
nothing calls this directly
no test coverage detected