Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions internal/transport/handler_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ func (s) TestHandlerTransport_NewServerHandlerTransport(t *testing.T) {
// Return w without its Flush method
type onlyCloseNotifier interface {
http.ResponseWriter
http.CloseNotifier
}
return struct{ onlyCloseNotifier }{w.(onlyCloseNotifier)}
},
Expand Down Expand Up @@ -196,7 +195,6 @@ func (s) TestHandlerTransport_NewServerHandlerTransport(t *testing.T) {
rrec := httptest.NewRecorder()
rw := http.ResponseWriter(testHandlerResponseWriter{
ResponseRecorder: rrec,
closeNotify: make(chan bool, 1),
})

if tt.modrw != nil {
Expand Down Expand Up @@ -227,16 +225,13 @@ func (s) TestHandlerTransport_NewServerHandlerTransport(t *testing.T) {

type testHandlerResponseWriter struct {
*httptest.ResponseRecorder
closeNotify chan bool
}

func (w testHandlerResponseWriter) CloseNotify() <-chan bool { return w.closeNotify }
func (w testHandlerResponseWriter) Flush() {}
func (w testHandlerResponseWriter) Flush() {}

func newTestHandlerResponseWriter() http.ResponseWriter {
return testHandlerResponseWriter{
ResponseRecorder: httptest.NewRecorder(),
closeNotify: make(chan bool, 1),
}
}

Expand Down