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

Method For

consumer_group_test.go:428–439  ·  view source on GitHub ↗
(reqBody versionedDecoder)

Source from the content-addressed store, hash-verified

426}
427
428func (m *mockHeartbeatRebalanceResponse) For(reqBody versionedDecoder) encoderWithHeader {
429 req := reqBody.(*HeartbeatRequest)
430 resp := &HeartbeatResponse{Version: req.version()}
431 m.mu.Lock()
432 defer m.mu.Unlock()
433 if m.successLeft > 0 {
434 m.successLeft--
435 } else {
436 resp.Err = ErrRebalanceInProgress
437 }
438 return resp
439}
440
441func TestConsumerGroupSessionCancelCause_Rebalance(t *testing.T) {
442 config := NewTestConfig()

Callers

nothing calls this directly

Calls 1

versionMethod · 0.65

Tested by

no test coverage detected