MCPcopy Index your code
hub / github.com/coder/coder / FailNow

Method FailNow

testutil/retry.go:166–173  ·  view source on GitHub ↗

FailNow implements testing.TB. FailNow marks the function as having failed and stops its execution by calling runtime.Goexit (which then runs all the deferred calls in the current goroutine).

()

Source from the content-addressed store, hash-verified

164// and stops its execution by calling runtime.Goexit (which then runs all the
165// deferred calls in the current goroutine).
166func (t *fakeT) FailNow() {
167 t.T.Helper()
168 t.mu.Lock()
169 defer t.mu.Unlock()
170 t.failed = true
171 t.T.Log("testutil.RunRetry: t.FailNow called in testutil.RunRetry closure")
172 runtime.Goexit()
173}
174
175// Failed implements testing.TB. Failed reports whether the function has failed.
176func (t *fakeT) Failed() bool {

Callers 15

FatalMethod · 0.95
FatalfMethod · 0.95
TestWorkspaceAgentLogsFunction · 0.80
TestStreamChatFunction · 0.80
TestWorkspaceWatcherFunction · 0.80
TestMetricsFunction · 0.80
TestBufferedUpdatesFunction · 0.80
testQueryParamsFunction · 0.80

Calls 4

LogMethod · 0.80
HelperMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by 15

TestWorkspaceAgentLogsFunction · 0.64
TestStreamChatFunction · 0.64
TestWorkspaceWatcherFunction · 0.64
TestMetricsFunction · 0.64
TestBufferedUpdatesFunction · 0.64
testQueryParamsFunction · 0.64
benchmarkRunnerFunction · 0.64
AssertMethod · 0.64