Skip to content

Commit

Permalink
feat(test): added test to show expected behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
paologallinaharbur committed Apr 2, 2024
1 parent 028ece0 commit 131b894
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/consumeroffset/kafka_offset_collect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ func TestNoActiveConsumersForConsumerGroup(t *testing.T) { // nolint: funlen
ClientId: testClientID,
ClientHost: "a-host",
MemberMetadata: nil,
// In the schema below there are no consumer assigned to any of the topics.
MemberAssignment: []byte{
0, 0, // Version
0, 0, 0, 0, // Topic array length
Expand Down Expand Up @@ -297,6 +298,7 @@ func TestNoActiveConsumersForConsumerGroup(t *testing.T) { // nolint: funlen
assert.Equal(t, expectedTopicEntities[topicName]["maxLag"], entity.Metrics[0].Metrics["consumerGroup.maxLag"])
assert.Equal(t, expectedTopicEntities[topicName]["activeConsumers"], entity.Metrics[0].Metrics["consumerGroup.activeConsumers"])
default:
// We do not expect any "ka-consumer" or "ka-partition-consumer" since no consumers are active.
assert.Fail(t, "not expected")
}
}
Expand Down

0 comments on commit 131b894

Please sign in to comment.