Skip to content

Commit

Permalink
ipv6: remove arbitrary deadlines from tests
Browse files Browse the repository at this point in the history
These deadlines were added back in CL 21080043, apparently in an
attempt to increase code coverage numbers. However, nothing in the
tests actually exercises the deadline logic: the tests would pass even
if these methods were no-ops. Their only apparent effect is to make
the tests flaky on slower builders, and to destroy goroutine traces
if the test should ever happen to deadlock.

Updates golang/go#42064
For golang/go#37319

Change-Id: I530a8f3cb80d6d93d1625bc88f0ec7958d4ec35e
Reviewed-on: https://go-review.googlesource.com/c/net/+/366181
Trust: Bryan Mills <[email protected]>
Run-TryBot: Bryan Mills <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
Bryan C. Mills committed Dec 6, 2021
1 parent 012df41 commit 266e24b
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions ipv6/multicast_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"os"
"runtime"
"testing"
"time"

"golang.org/x/net/icmp"
"golang.org/x/net/internal/iana"
Expand Down Expand Up @@ -100,9 +99,6 @@ func TestPacketConnReadWriteMulticastUDP(t *testing.T) {
}
t.Fatal(err)
}
if err := p.SetDeadline(time.Now().Add(200 * time.Millisecond)); err != nil {
t.Fatal(err)
}
cm.HopLimit = i + 1
if n, err := p.WriteTo(wb, &cm, &grp); err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -240,9 +236,6 @@ func TestPacketConnReadWriteMulticastICMP(t *testing.T) {
}
t.Fatal(err)
}
if err := p.SetDeadline(time.Now().Add(200 * time.Millisecond)); err != nil {
t.Fatal(err)
}
cm.HopLimit = i + 1
if n, err := p.WriteTo(wb, &cm, tt.grp); err != nil {
t.Fatal(err)
Expand Down

0 comments on commit 266e24b

Please sign in to comment.