]> Cypherpunks repositories - gostls13.git/commitdiff
net: make TCPStress test shorter
authorDmitriy Vyukov <dvyukov@google.com>
Wed, 14 Aug 2013 17:53:27 +0000 (21:53 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Wed, 14 Aug 2013 17:53:27 +0000 (21:53 +0400)
It timeouts on freebsd builders:
http://build.golang.org/log/3d8169e13bff912bebf6fd3c54b34ad2d29a7221
but there are always runnable goroutines,
which suggests that it's slowly progressing.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12939043

src/pkg/net/tcp_test.go

index 5b3d8353cf910b47de84ca55c7b02a615ac03f1b..e3c79b2c841cddc47e510df74c155df2f7eac0b0 100644 (file)
@@ -497,8 +497,11 @@ func TestTCPReadWriteMallocs(t *testing.T) {
 
 func TestTCPStress(t *testing.T) {
        const conns = 2
-       const msgs = 1e4
        const msgLen = 512
+       msgs := int(1e4)
+       if testing.Short() {
+               msgs = 1e2
+       }
 
        sendMsg := func(c Conn, buf []byte) bool {
                n, err := c.Write(buf)