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)
| 2165 | |
| 2166 | // assertGroupOffset asserts result has groupID with the expected offset at topic/partition. |
| 2167 | func 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. |
no test coverage detected