mirror of
https://github.com/golang/go
synced 2024-11-20 03:14:43 -07:00
net: disable multicast tests by default.
Fixes #1649. R=rsc, adg CC=golang-dev https://golang.org/cl/4343056
This commit is contained in:
parent
dd4423292e
commit
8b8b54ad5c
@ -5,14 +5,21 @@
|
||||
package net
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"runtime"
|
||||
"testing"
|
||||
)
|
||||
|
||||
var multicast = flag.Bool("multicast", false, "enable multicast tests")
|
||||
|
||||
func TestMulticastJoinAndLeave(t *testing.T) {
|
||||
if runtime.GOOS == "windows" {
|
||||
return
|
||||
}
|
||||
if !*multicast {
|
||||
t.Logf("test disabled; use --multicast to enable")
|
||||
return
|
||||
}
|
||||
|
||||
addr := &UDPAddr{
|
||||
IP: IPv4zero,
|
||||
@ -40,6 +47,10 @@ func TestMulticastJoinAndLeave(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestJoinFailureWithIPv6Address(t *testing.T) {
|
||||
if !*multicast {
|
||||
t.Logf("test disabled; use --multicast to enable")
|
||||
return
|
||||
}
|
||||
addr := &UDPAddr{
|
||||
IP: IPv4zero,
|
||||
Port: 0,
|
||||
|
Loading…
Reference in New Issue
Block a user