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

Issue 39200044: code review 39200044: net: use DialTimeout in TestSelfConnect (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 4 months ago by iant
Modified:
10 years, 4 months ago
Reviewers:
bradfitz
CC:
golang-codereviews, bradfitz
Visibility:
Public.

Description

net: use DialTimeout in TestSelfConnect This avoids problems with systems that take a long time to find out nothing is listening, while still testing for the self-connect misfeature since a self-connect should be fast. With this we may be able to remove the test for non-Linux systems. Tested (on GNU/Linux) by editing selfConnect in tcpsock_posix.go to always return false and verifying that TestSelfConnect then fails with and without this change. Idea from Uros Bizjak.

Patch Set 1 #

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M src/pkg/net/dial_test.go View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3
iant
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
10 years, 4 months ago (2013-12-27 14:52:29 UTC) #1
bradfitz
LGTM On Fri, Dec 27, 2013 at 6:52 AM, <iant@golang.org> wrote: > Reviewers: golang-codereviews, > ...
10 years, 4 months ago (2013-12-27 16:33:44 UTC) #2
iant
10 years, 4 months ago (2013-12-27 16:49:49 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=340bbaa0e3eb ***

net: use DialTimeout in TestSelfConnect

This avoids problems with systems that take a long time to
find out nothing is listening, while still testing for the
self-connect misfeature since a self-connect should be fast.
With this we may be able to remove the test for non-Linux
systems.

Tested (on GNU/Linux) by editing selfConnect in
tcpsock_posix.go to always return false and verifying that
TestSelfConnect then fails with and without this change.

Idea from Uros Bizjak.

R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/39200044
Sign in to reply to this message.

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