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

Function assertGroupOffset

admin_test.go:2167–2173  ·  view source on GitHub ↗

assertGroupOffset asserts result has groupID with the expected offset at topic/partition.

(t *testing.T, result map[string]*OffsetFetchResponseGroup, groupID, topic string, partition int32, expected int64)

Source from the content-addressed store, hash-verified

2165
2166// assertGroupOffset asserts result has groupID with the expected offset at topic/partition.
2167func assertGroupOffset(t *testing.T, result map[string]*OffsetFetchResponseGroup, groupID, topic string, partition int32, expected int64) {
2168 t.Helper()
2169 require.Contains(t, result, groupID)
2170 block := result[groupID].GetBlock(topic, partition)
2171 require.NotNil(t, block)
2172 assert.Equal(t, expected, block.Offset)
2173}
2174
2175// mockMetadataFor builds a MockMetadataResponse with controller and brokers
2176// populated. Callers chain .SetLeader as needed.

Callers 1

Calls 2

HelperMethod · 0.80
GetBlockMethod · 0.45

Tested by

no test coverage detected