From 9dba695692c68b16555f113329606a56ff99b829 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 10 Nov 2009 17:39:01 -0800 Subject: [PATCH] net: disable dns error test some dns resolvers (opendns, for example) are willing to make up results for any name. R=agl, agl1 CC=golang-dev https://golang.org/cl/152049 --- src/pkg/net/net_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pkg/net/net_test.go b/src/pkg/net/net_test.go index c06a05b3ef..39fdf1e1d2 100644 --- a/src/pkg/net/net_test.go +++ b/src/pkg/net/net_test.go @@ -5,10 +5,13 @@ package net import ( + "flag"; "regexp"; "testing"; ) +var runErrorTest = flag.Bool("run_error_test", false, "let TestDialError check for dns errors") + type DialErrorTest struct { Net string; Laddr string; @@ -52,6 +55,10 @@ var dialErrorTests = []DialErrorTest{ } func TestDialError(t *testing.T) { + if !*runErrorTest { + t.Logf("test disabled; use --run_error_test to enable"); + return; + } for i, tt := range dialErrorTests { c, e := Dial(tt.Net, tt.Laddr, tt.Raddr); if c != nil { -- 2.50.0