Skip to content

Commit 6942641

Browse files
committed
Tests for describing a topic
1 parent e86c670 commit 6942641

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

spec/functional/topic_management_spec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,14 @@
3232
kafka.create_partitions_for(topic, num_partitions: 10)
3333
expect(kafka.partitions_for(topic)).to eq 10
3434
end
35+
36+
example "describe a topic" do
37+
unless kafka.supports_api?(Kafka::Protocol::DESCRIBE_CONFIGS_API)
38+
skip("This Kafka version not support ")
39+
end
40+
configs = kafka.describe_topic(topic, %w(retention.ms retention.bytes non_exists))
41+
expect(configs.keys).to eql(%w(retention.ms retention.bytes))
42+
expect(configs['retention.ms']).to be_a(String)
43+
expect(configs['retention.bytes']).to be_a(String)
44+
end
3545
end

0 commit comments

Comments
 (0)