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

Function mockGroupCoordinators

admin_test.go:2157–2164  ·  view source on GitHub ↗

mockGroupCoordinators builds a FindCoordinator handler placing every named group on coordinator.

(t *testing.T, coordinator *MockBroker, groups ...string)

Source from the content-addressed store, hash-verified

2155// mockGroupCoordinators builds a FindCoordinator handler placing every named
2156// group on coordinator.
2157func mockGroupCoordinators(t *testing.T, coordinator *MockBroker, groups ...string) *MockFindCoordinatorResponse {
2158 t.Helper()
2159 r := NewMockFindCoordinatorResponse(t)
2160 for _, g := range groups {
2161 r.SetCoordinator(CoordinatorGroup, g, coordinator)
2162 }
2163 return r
2164}
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) {

Callers 2

Calls 3

SetCoordinatorMethod · 0.95
HelperMethod · 0.80

Tested by

no test coverage detected