MCPcopy Index your code
hub / github.com/coder/coder / newTestRetryPayload

Function newTestRetryPayload

coderd/x/chatd/chatd_internal_test.go:2663–2676  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2661}
2662
2663func newTestRetryPayload() *codersdk.ChatStreamRetry {
2664 payload := chaterror.StreamRetryPayload(1, 1500*time.Millisecond, chaterror.ClassifiedError{
2665 Message: "OpenAI is rate limiting requests.",
2666 Kind: codersdk.ChatErrorKindRateLimit,
2667 Provider: "openai",
2668 Retryable: true,
2669 StatusCode: 429,
2670 })
2671 if payload == nil {
2672 panic("expected retry payload")
2673 }
2674 payload.RetryingAt = time.Unix(1_700_000_000, 0).UTC()
2675 return payload
2676}
2677
2678func TestSubscribeAuthorizedFallsBackToStaleRowWhenRefreshFails(t *testing.T) {
2679 t.Parallel()

Calls 1

StreamRetryPayloadFunction · 0.92

Tested by

no test coverage detected