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

Function Test_stickyBalanceStrategy_Plan_data_race

balance_strategy_test.go:2090–2105  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2088}
2089
2090func Test_stickyBalanceStrategy_Plan_data_race(t *testing.T) {
2091 for range 1000 {
2092 go func(bs BalanceStrategy) {
2093 members := map[string]ConsumerGroupMemberMetadata{
2094 "m1": {
2095 Version: 3,
2096 Topics: []string{"topic"},
2097 },
2098 }
2099 topics := map[string][]int32{
2100 "topic": {0, 1, 2},
2101 }
2102 _, _ = bs.Plan(members, topics)
2103 }(NewBalanceStrategySticky())
2104 }
2105}
2106
2107func BenchmarkStickAssignmentWithLargeNumberOfConsumersAndTopics(b *testing.B) {
2108 s := &stickyBalanceStrategy{}

Callers

nothing calls this directly

Calls 2

NewBalanceStrategyStickyFunction · 0.85
PlanMethod · 0.65

Tested by

no test coverage detected