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

Function expectLogsN

internal/grpctest/tlogger.go:190–199  ·  view source on GitHub ↗
(expr string, n int, logType logType)

Source from the content-addressed store, hash-verified

188}
189
190func expectLogsN(expr string, n int, logType logType) {
191 tLogr.mu.Lock()
192 defer tLogr.mu.Unlock()
193 re, err := regexp.Compile(expr)
194 if err != nil {
195 tLogr.t.Error(err)
196 return
197 }
198 tLogr.logs[logType][re] += n
199}
200
201// endTest checks if expected errors were not encountered.
202func (tl *tLogger) endTest(t *testing.T) {

Callers 3

ExpectErrorFunction · 0.85
ExpectErrorNFunction · 0.85
ExpectWarningFunction · 0.85

Calls 3

ErrorMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected