Skip to content

Commit 12a2221

Browse files
Maisem Alimaisem
Maisem Ali
authored andcommitted
cmd/testwrapper/flakytest: clearly describe why TestFlakeRun fails
Fixes tailscale#8474 Signed-off-by: Maisem Ali <[email protected]>
1 parent 97ee0bc commit 12a2221

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/testwrapper/flakytest/flakytest_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,16 @@ func TestIssueFormat(t *testing.T) {
2828
}
2929
}
3030

31+
// TestFlakeRun is a test that fails when run in the testwrapper
32+
// for the first time, but succeeds on the second run.
33+
// It's used to test whether the testwrapper retries flaky tests.
3134
func TestFlakeRun(t *testing.T) {
3235
Mark(t, "https://github.com/tailscale/tailscale/issues/0") // random issue
3336
e := os.Getenv(FlakeAttemptEnv)
3437
if e == "" {
3538
t.Skip("not running in testwrapper")
3639
}
3740
if e == "1" {
38-
t.Fatal("failing on purpose")
41+
t.Fatal("First run in testwrapper, failing so that test is retried. This is expected.")
3942
}
4043
}

0 commit comments

Comments
 (0)