all: protect alloc count tests by -testing.short
Update #5000
Should reduce the flakiness a little. Malloc counting is important
to general testing but not to the build dashboard, which uses -short.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/12866047
diff --git a/src/pkg/net/tcp_test.go b/src/pkg/net/tcp_test.go
index e3c79b2..15f46a1 100644
--- a/src/pkg/net/tcp_test.go
+++ b/src/pkg/net/tcp_test.go
@@ -453,6 +453,9 @@
}
func TestTCPReadWriteMallocs(t *testing.T) {
+ if testing.Short() {
+ t.Skip("skipping malloc count in short mode")
+ }
maxMallocs := 10000
switch runtime.GOOS {
// Add other OSes if you know how many mallocs they do.