diff --git a/cmd/testwrapper/flakytest/flakytest_test.go b/cmd/testwrapper/flakytest/flakytest_test.go index 207a27de7..85e77a939 100644 --- a/cmd/testwrapper/flakytest/flakytest_test.go +++ b/cmd/testwrapper/flakytest/flakytest_test.go @@ -28,6 +28,9 @@ func TestIssueFormat(t *testing.T) { } } +// TestFlakeRun is a test that fails when run in the testwrapper +// for the first time, but succeeds on the second run. +// It's used to test whether the testwrapper retries flaky tests. func TestFlakeRun(t *testing.T) { Mark(t, "https://github.com/tailscale/tailscale/issues/0") // random issue e := os.Getenv(FlakeAttemptEnv) @@ -35,6 +38,6 @@ func TestFlakeRun(t *testing.T) { t.Skip("not running in testwrapper") } if e == "1" { - t.Fatal("failing on purpose") + t.Fatal("First run in testwrapper, failing so that test is retried. This is expected.") } }