Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(266)

Issue 141210043: code review 141210043: net/http/httptest: delete TestIssue7264 (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 8 months ago by rsc
Modified:
9 years, 8 months ago
Reviewers:
bradfitz
CC:
bradfitz, brainman, golang-codereviews
Visibility:
Public.

Description

net/http/httptest: delete TestIssue7264 Now it's failing on Windows: panic: httptest: failed to listen on a port: listen tcp 127.0.0.1:0: listen: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full. Since we can't seem to understand what the test is trying to test, and because it is causing problems on multiple systems, delete it. Fixes issue 7264.

Patch Set 1 #

Patch Set 2 : diff -r ff90f098ca6e1bf4e07895d3c91b4cbd29091bd8 https://code.google.com/p/go/ #

Patch Set 3 : diff -r ff90f098ca6e1bf4e07895d3c91b4cbd29091bd8 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -23 lines) Patch
M src/pkg/net/http/httptest/server_test.go View 1 2 chunks +0 lines, -23 lines 0 comments Download

Messages

Total messages: 3
rsc
Hello bradfitz (cc: brainman, golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
9 years, 8 months ago (2014-09-08 03:40:27 UTC) #1
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=ef205c956dc9 *** net/http/httptest: delete TestIssue7264 Now it's failing on Windows: panic: httptest: ...
9 years, 8 months ago (2014-09-08 03:40:33 UTC) #2
bradfitz
9 years, 8 months ago (2014-09-08 03:44:18 UTC) #3
LGTM


On Sun, Sep 7, 2014 at 8:40 PM, <rsc@golang.org> wrote:

> Reviewers: bradfitz,
>
> Message:
> Hello bradfitz (cc: brainman, golang-codereviews@googlegroups.com),
>
> I'd like you to review this change to
> https://code.google.com/p/go/
>
>
> Description:
> net/http/httptest: delete TestIssue7264
>
> Now it's failing on Windows:
>
> panic: httptest: failed to listen on a port: listen tcp 127.0.0.1:0:
> listen: An operation on a socket could not be performed because the
> system lacked sufficient buffer space or because a queue was full.
>
> Since we can't seem to understand what the test is trying to test,
> and because it is causing problems on multiple systems,
> delete it.
>
> Fixes issue 7264.
>
> Please review this at https://codereview.appspot.com/141210043/
>
> Affected files (+0, -23 lines):
>   M src/pkg/net/http/httptest/server_test.go
>
>
> Index: src/pkg/net/http/httptest/server_test.go
> ===================================================================
> --- a/src/pkg/net/http/httptest/server_test.go
> +++ b/src/pkg/net/http/httptest/server_test.go
> @@ -8,7 +8,6 @@
>         "io/ioutil"
>         "net/http"
>         "testing"
> -       "time"
>  )
>
>  func TestServer(t *testing.T) {
> @@ -28,25 +27,3 @@
>                 t.Errorf("got %q, want hello", string(got))
>         }
>  }
> -
> -func TestIssue7264(t *testing.T) {
> -       for i := 0; i < 1000; i++ {
> -               func() {
> -                       ts := NewServer(http.HandlerFunc(func(w
> http.ResponseWriter, r *http.Request) {}))
> -                       defer ts.Close()
> -                       tr := &http.Transport{
> -                               ResponseHeaderTimeout: time.Nanosecond,
> -                       }
> -                       defer tr.CloseIdleConnections()
> -                       c := &http.Client{Transport: tr}
> -                       res, err := c.Get(ts.URL)
> -                       // err can be non-nil here.
> -                       // If the client writes the header and then
> immediately observes
> -                       // the timeout and closes the connection, the
> server might never
> -                       // have gotten a chance to send a response. That's
> okay.
> -                       if err == nil {
> -                               res.Body.Close()
> -                       }
> -               }()
> -       }
> -}
>
>
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b