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

Function NewTestLogWriter

testutil/logger.go:63–71  ·  view source on GitHub ↗
(t testing.TB)

Source from the content-addressed store, hash-verified

61}
62
63func NewTestLogWriter(t testing.TB) io.Writer {
64 w := &testLogWriter{t: t}
65 t.Cleanup(func() {
66 w.mu.Lock()
67 defer w.mu.Unlock()
68 w.testOver = true
69 })
70 return w
71}
72
73func (w *testLogWriter) Write(p []byte) (n int, err error) {
74 n = len(p)

Callers 5

TestRunner_RunFunction · 0.92
TestRunner_CleanupFunction · 0.92

Calls 3

CleanupMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by 5

TestRunner_RunFunction · 0.74
TestRunner_CleanupFunction · 0.74