func TestPerRequestWithWriteEventuallyReturnsDeadlineError(t *testing.T) { … } func TestPerRequestWithFlushReturnsErrorAfterDeadline(t *testing.T) { … } func TestPerRequestWithClientNeverReceivesContentFlushedAfterDeadline(t *testing.T) { … } func TestPerRequestWithClientReceivesContentFlushedBeforeDeadline(t *testing.T) { … } func TestPerRequestWithHandlerShouldAbortWriteAfterDeadline(t *testing.T) { … } func TestPerRequestWithBodyReadShouldTimeoutAfterDeadline(t *testing.T) { … } func TestPerRequestWithBodyReadShouldYieldPartialContentBeforeDeadline(t *testing.T) { … } func TestPerRequestWithReadingEmptyBodyShouldNotYieldErrorAfterDeadline(t *testing.T) { … } func TestPerRequestWithHijackedConnectionShouldResetDeadline(t *testing.T) { … } func TestPerRequestWithConnectionIsReused(t *testing.T) { … } func TestPerRequestWithSlowReader(t *testing.T) { … } func sendWithTrace(t *testing.T, client *http.Client, url string, f func(*testing.T, httptrace.GotConnInfo)) (*http.Response, error) { … } func shouldUseExistingConnection(t *testing.T, ci httptrace.GotConnInfo) { … } func shouldUseNewConnection(t *testing.T, ci httptrace.GotConnInfo) { … } type neverEnding … func (b neverEnding) Read(p []byte) (n int, err error) { … } func closeResponseBody(t *testing.T, resp *http.Response) { … } type waiter … type waitWithDuration … func (w waitWithDuration) wait() <-chan time.Time { … } func (w waitWithDuration) close() { … } type waitForClose … func (w waitForClose) wait() <-chan time.Time { … } func (w waitForClose) close() { … } type chanErr … func (ch chanErr) wait(t *testing.T, timeoutCh <-chan time.Time) error { … } type verifier … type wantNoError … func (v wantNoError) verify(t *testing.T, got error) { … } type wantContains … func (v wantContains) verify(t *testing.T, got error) { … } type wantError … func (v wantError) verify(t *testing.T, got error) { … } type wantEitherOr … func (v wantEitherOr) verify(t *testing.T, got error) { … }