Atlas › Test

Fatal

Exact test identity: go.temporal.io/server/common/testing/await/TestT_CollectsAssertionFailures/Fatal

Package
go.temporal.io/server/common/testing/await
Suite / test hierarchy
TestT_CollectsAssertionFailures/Fatal
Test
Fatal
Introduced at
t.go ×1 Frontier kind: Joint frontier
Covered ranges
4
Covered lines
13
Covered files
1

Covered source

Expand a file to inspect source; the > gutter marks covered lines.

go.temporal.io/server/common/testing/await/t.go 13 covered LOC · 4 ranges

Open complete file

47
48 // Fail marks the current attempt as failed without stopping it.
49 > func (t *T) Fail() { t.go
50 > t.failed = true
51 > }
52
53 // Error records an error message for reporting on timeout.
65 // FailNow is called by require.* on failure. It stops the current attempt.
66 // Unlike testing.TB.FailNow(), this does NOT mark the test as failed.
67 > func (t *T) FailNow() { t.go
68 > t.Fail()
69 > panic(attemptFailed{})
70 }
71
72 // Fatal records an error message and stops this attempt.
73 > func (t *T) Fatal(args ...any) { t.go
74 > t.errors = append(t.errors, strings.TrimSuffix(fmt.Sprintln(args...), "\n"))
75 > t.FailNow()
76 > }
77
78 // Fatalf records an error message and stops this attempt.
83
84 // Failed reports whether this attempt has failed.
85 > func (t *T) Failed() bool { t.go
86 > return t.failed
87 > }
88
89 // Helper marks the calling function as a test helper.