MCPcopy
hub / github.com/grpc/grpc-go / logOutputHasContents

Function logOutputHasContents

test/end2end_test.go:5103–5117  ·  view source on GitHub ↗
(v []byte, wakeup chan<- bool)

Source from the content-addressed store, hash-verified

5101}
5102
5103func logOutputHasContents(v []byte, wakeup chan<- bool) bool {
5104 testLogOutput.mu.Lock()
5105 defer testLogOutput.mu.Unlock()
5106 fw, ok := testLogOutput.w.(*filterWriter)
5107 if !ok {
5108 return false
5109 }
5110 fw.mu.Lock()
5111 defer fw.mu.Unlock()
5112 if bytes.Contains(fw.buf.Bytes(), v) {
5113 return true
5114 }
5115 fw.wakeup = wakeup
5116 return false
5117}
5118
5119var verboseLogs = flag.Bool("verbose_logs", false, "show all log output, without filtering")
5120

Callers 1

awaitLogOutputFunction · 0.85

Calls 3

BytesMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected