mirror of
				https://github.com/golang/go.git
				synced 2025-10-31 00:30:57 +00:00 
			
		
		
		
	 992374f8fb
			
		
	
	
		992374f8fb
		
	
	
	
	
		
			
			Now builders say: pkg/net/dnsclient_unix_test.go:10: imported and not used: "runtime" R=golang-dev CC=golang-dev https://golang.org/cl/12890043
		
			
				
	
	
		
			27 lines
		
	
	
	
		
			635 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
	
		
			635 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Copyright 2013 The Go Authors. All rights reserved.
 | |
| // Use of this source code is governed by a BSD-style
 | |
| // license that can be found in the LICENSE file.
 | |
| 
 | |
| // +build darwin freebsd linux netbsd openbsd
 | |
| 
 | |
| package net
 | |
| 
 | |
| import (
 | |
| 	"testing"
 | |
| )
 | |
| 
 | |
| func TestTCPLookup(t *testing.T) {
 | |
| 	if testing.Short() || !*testExternal {
 | |
| 		t.Skip("skipping test to avoid external network")
 | |
| 	}
 | |
| 	c, err := Dial("tcp", "8.8.8.8:53")
 | |
| 	defer c.Close()
 | |
| 	if err != nil {
 | |
| 		t.Fatalf("Dial failed: %v", err)
 | |
| 	}
 | |
| 	cfg := &dnsConfig{timeout: 10, attempts: 3}
 | |
| 	_, err = exchange(cfg, c, "com.", dnsTypeALL)
 | |
| 	if err != nil {
 | |
| 		t.Fatalf("exchange failed: %v", err)
 | |
| 	}
 | |
| }
 |