mirror of
https://github.com/golang/go
synced 2024-11-20 03:34:40 -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
|
package net
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"flag"
|
||||||
"runtime"
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var multicast = flag.Bool("multicast", false, "enable multicast tests")
|
||||||
|
|
||||||
func TestMulticastJoinAndLeave(t *testing.T) {
|
func TestMulticastJoinAndLeave(t *testing.T) {
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if !*multicast {
|
||||||
|
t.Logf("test disabled; use --multicast to enable")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
addr := &UDPAddr{
|
addr := &UDPAddr{
|
||||||
IP: IPv4zero,
|
IP: IPv4zero,
|
||||||
@ -40,6 +47,10 @@ func TestMulticastJoinAndLeave(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestJoinFailureWithIPv6Address(t *testing.T) {
|
func TestJoinFailureWithIPv6Address(t *testing.T) {
|
||||||
|
if !*multicast {
|
||||||
|
t.Logf("test disabled; use --multicast to enable")
|
||||||
|
return
|
||||||
|
}
|
||||||
addr := &UDPAddr{
|
addr := &UDPAddr{
|
||||||
IP: IPv4zero,
|
IP: IPv4zero,
|
||||||
Port: 0,
|
Port: 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user