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:
committed by
Brad Fitzpatrick
parent
39e35379d4
commit
72bc7334fb
@@ -4,12 +4,22 @@
|
|||||||
package speedtest
|
package speedtest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"flag"
|
||||||
"net"
|
"net"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"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) {
|
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.
|
// start a listener and find the port where the server will be listening.
|
||||||
l, err := net.Listen("tcp", ":0")
|
l, err := net.Listen("tcp", ":0")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user