Atlas › Test
Fatalf
Exact test identity: go.temporal.io/server/common/testing/await/TestT_CollectsAssertionFailures/Fatalf
- Package
go.temporal.io/server/common/testing/await
- Suite / test hierarchy
TestT_CollectsAssertionFailures/Fatalf
- Test
Fatalf
- Introduced at
- t.go ×1 Frontier kind: Joint frontier
- Covered ranges
- 5
- Covered lines
- 17
- 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 17 covered LOC · 5 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.
58
59
// Errorf records an error message for reporting on timeout.
60
>
func (t *T) Errorf(format string, args ...any) {
t.go
61
>
t.Fail()
62
>
t.errors = append(t.errors, fmt.Sprintf(format, args...))
63
>
}
64
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
77
78
// Fatalf records an error message and stops this attempt.
79
>
func (t *T) Fatalf(format string, args ...any) {
t.go
80
>
t.Errorf(format, args...)
81
>
t.FailNow()
82
>
}
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.