net/speedtest: mark flaky test, and skip it by default as it's slow

Updates #17338

Change-Id: I1f3dbc154ba274f615cc77d2aa76f6ff9d40137c
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2025-09-29 13:57:04 -07:00
committed by Brad Fitzpatrick
parent 39e35379d4
commit 72bc7334fb

View File

@@ -4,12 +4,22 @@
package speedtest
import (
"flag"
"net"
"testing"
"time"
"tailscale.com/cmd/testwrapper/flakytest"
)
var manualTest = flag.Bool("do-speedtest", false, "if true, run the speedtest TestDownload test. Otherwise skip it because it's slow and flaky; see https://github.com/tailscale/tailscale/issues/17338")
func TestDownload(t *testing.T) {
if !*manualTest {
t.Skip("skipping slow test without --do-speedtest")
}
flakytest.Mark(t, "https://github.com/tailscale/tailscale/issues/17338")
// start a listener and find the port where the server will be listening.
l, err := net.Listen("tcp", ":0")
if err != nil {