MCPcopy
hub / github.com/IBM/sarama / safeClose

Function safeClose

helpers_test.go:11–17  ·  view source on GitHub ↗
(t testing.TB, c io.Closer)

Source from the content-addressed store, hash-verified

9)
10
11func safeClose(t testing.TB, c io.Closer) {
12 t.Helper()
13 err := c.Close()
14 if err != nil {
15 t.Error(err)
16 }
17}
18
19func closeProducerWithTimeout(t *testing.T, p AsyncProducer, timeout time.Duration) {
20 var wg sync.WaitGroup

Callers 15

produceMsgsFunction · 0.70
consumeMsgsFunction · 0.70
TestInterceptorsFunction · 0.70
testProducingMessagesFunction · 0.70
benchmarkProducerFunction · 0.70
TestSyncProducerFunction · 0.70

Calls 3

HelperMethod · 0.80
CloseMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected