MCPcopy
hub / github.com/etcd-io/bbolt / runWorker

Function runWorker

concurrent_test.go:321–332  ·  view source on GitHub ↗
(t *testing.T, w *worker, errCh chan error)

Source from the content-addressed store, hash-verified

319}
320
321func runWorker(t *testing.T, w *worker, errCh chan error) (historyRecords, error) {
322 rs, err := w.run()
323 if len(rs) > 0 && err == nil {
324 if terr := validateIncrementalTxid(rs); terr != nil {
325 txidErr := fmt.Errorf("[%s]: %w", w.name(), terr)
326 t.Error(txidErr)
327 errCh <- txidErr
328 return rs, txidErr
329 }
330 }
331 return rs, err
332}
333
334type worker struct {
335 id int

Callers 1

runWorkersFunction · 0.85

Calls 5

validateIncrementalTxidFunction · 0.85
nameMethod · 0.80
ErrorfMethod · 0.65
ErrorMethod · 0.65
runMethod · 0.45

Tested by

no test coverage detected