Merge pull request #19458 from davidopp/notsclose

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot
2016-01-12 13:53:13 -08:00
50 changed files with 410 additions and 202 deletions

View File

@@ -26,7 +26,8 @@ import (
func TestFakeHandlerPath(t *testing.T) {
handler := FakeHandler{}
server := httptest.NewServer(&handler)
defer server.Close()
// TODO: Uncomment when fix #19254
// defer server.Close()
method := "GET"
path := "/foo/bar"
body := "somebody"
@@ -48,7 +49,8 @@ func TestFakeHandlerPath(t *testing.T) {
func TestFakeHandlerPathNoBody(t *testing.T) {
handler := FakeHandler{}
server := httptest.NewServer(&handler)
defer server.Close()
// TODO: Uncomment when fix #19254
// defer server.Close()
method := "GET"
path := "/foo/bar"
@@ -79,7 +81,8 @@ func (f *fakeError) Logf(format string, args ...interface{}) {}
func TestFakeHandlerWrongPath(t *testing.T) {
handler := FakeHandler{}
server := httptest.NewServer(&handler)
defer server.Close()
// TODO: Uncomment when fix #19254
// defer server.Close()
method := "GET"
path := "/foo/bar"
fakeT := fakeError{}
@@ -104,7 +107,8 @@ func TestFakeHandlerWrongPath(t *testing.T) {
func TestFakeHandlerWrongMethod(t *testing.T) {
handler := FakeHandler{}
server := httptest.NewServer(&handler)
defer server.Close()
// TODO: Uncomment when fix #19254
// defer server.Close()
method := "GET"
path := "/foo/bar"
fakeT := fakeError{}
@@ -129,7 +133,8 @@ func TestFakeHandlerWrongMethod(t *testing.T) {
func TestFakeHandlerWrongBody(t *testing.T) {
handler := FakeHandler{}
server := httptest.NewServer(&handler)
defer server.Close()
// TODO: Uncomment when fix #19254
// defer server.Close()
method := "GET"
path := "/foo/bar"
body := "somebody"
@@ -156,7 +161,8 @@ func TestFakeHandlerWrongBody(t *testing.T) {
func TestFakeHandlerNilBody(t *testing.T) {
handler := FakeHandler{}
server := httptest.NewServer(&handler)
defer server.Close()
// TODO: Uncomment when fix #19254
// defer server.Close()
method := "GET"
path := "/foo/bar"
body := "somebody"

View File

@@ -146,7 +146,8 @@ func TestRoundTripAndNewConnection(t *testing.T) {
stream := <-streamCh
io.Copy(stream, stream)
}))
defer server.Close()
// TODO: Uncomment when fix #19254
// defer server.Close()
req, err := http.NewRequest("GET", server.URL, nil)
if err != nil {

View File

@@ -66,7 +66,8 @@ func TestUpgradeResponse(t *testing.T) {
}
defer conn.Close()
}))
defer server.Close()
// TODO: Uncomment when fix #19254
// defer server.Close()
req, err := http.NewRequest("GET", server.URL, nil)
if err != nil {

View File

@@ -219,7 +219,8 @@ func TestProxyTransport(t *testing.T) {
w.Header().Set("Content-Type", item.contentType)
fmt.Fprint(w, item.input)
}))
defer server.Close()
// TODO: Uncomment when fix #19254
// defer server.Close()
// Replace source URL with our test server address.
sourceURL := parseURLOrDie(item.sourceURL)

View File

@@ -36,8 +36,10 @@ func newServer(handler websocket.Handler) (*httptest.Server, string) {
func TestRawConn(t *testing.T) {
conn := NewConn(ReadWriteChannel, ReadWriteChannel, IgnoreChannel, ReadChannel, WriteChannel)
s, addr := newServer(conn.handle)
defer s.Close()
// TODO: Uncomment next two lines and remove third line when fix #19254
// s, addr := newServer(conn.handle)
// defer s.Close()
_, addr := newServer(conn.handle)
client, err := websocket.Dial("ws://"+addr, "", "http://localhost/")
if err != nil {
@@ -113,8 +115,10 @@ func TestRawConn(t *testing.T) {
func TestBase64Conn(t *testing.T) {
conn := NewConn(ReadWriteChannel, ReadWriteChannel)
s, addr := newServer(conn.handle)
defer s.Close()
// TODO: Uncomment next two lines and remove third line when fix #19254
// s, addr := newServer(conn.handle)
// defer s.Close()
_, addr := newServer(conn.handle)
config, err := websocket.NewConfig("ws://"+addr, "http://localhost/")
if err != nil {