Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/verify_kafka_warnings
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ allowed_patterns=(
"Unloaded transaction metadata"
"closing connection"
"sent a heartbeat request but received error REQUEST_TIMED_OUT"
"Auto topic creation failed for it-ne-"
"Topic '__consumer_offsets' already exists"
)

# Get all warnings
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-ssl.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
kafka:
container_name: kafka
image: confluentinc/cp-kafka:8.1.1
image: confluentinc/cp-kafka:8.2.0
ports:
- 9092:9092 # Support PLAINTEXT so we can run one docker setup for SSL and PLAINTEXT
- 9093:9093
Expand All @@ -19,7 +19,7 @@ services:
KAFKA_BROKER_ID: 1
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@127.0.0.1:9094
ALLOW_PLAINTEXT_LISTENER: 'yes'
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'false'
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "true"
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
kafka:
container_name: kafka
image: confluentinc/cp-kafka:8.1.1
image: confluentinc/cp-kafka:8.2.0

ports:
- 9092:9092
Expand All @@ -18,7 +18,7 @@ services:
KAFKA_BROKER_ID: 1
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@127.0.0.1:9093
ALLOW_PLAINTEXT_LISTENER: 'yes'
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'false'
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "true"
Expand Down
15 changes: 9 additions & 6 deletions spec/lib/rdkafka/admin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,9 @@
expect(resources_results.first.type).to eq(4)
expect(resources_results.first.name).to eq("1")
expect(resources_results.first.configs.size).to be > 230
expect(resources_results.first.configs.first.name).to eq("log.cleaner.min.compaction.lag.ms")
expect(resources_results.first.configs.first.value).to eq("0")
config = resources_results.first.configs.find { |c| c.name == "log.cleaner.min.compaction.lag.ms" }
expect(config).not_to be_nil
expect(config.value).to eq("0")
expect(resources_results.first.configs.map(&:synonyms)).not_to be_empty
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These specs now avoid relying on configs.first ordering, but there is still a remaining expectation earlier in this file that asserts resources_results.first.configs.first is compression.type/producer (around lines 179-180). With Kafka upgrades changing config ordering, that earlier assertion is likely still flaky; consider updating it to locate the config by name (similar to the new find { |c| c.name == ... } pattern) for consistency and stability.

Suggested change
expect(resources_results.first.configs.map(&:synonyms)).not_to be_empty
expect(config.synonyms).not_to be_empty

Copilot uses AI. Check for mistakes.
end
end
Expand All @@ -263,13 +264,15 @@
expect(resources_results.first.type).to eq(4)
expect(resources_results.first.name).to eq("1")
expect(resources_results.first.configs.size).to be > 230
expect(resources_results.first.configs.first.name).to eq("log.cleaner.min.compaction.lag.ms")
expect(resources_results.first.configs.first.value).to eq("0")
config = resources_results.first.configs.find { |c| c.name == "log.cleaner.min.compaction.lag.ms" }
expect(config).not_to be_nil
expect(config.value).to eq("0")
expect(resources_results.last.type).to eq(2)
expect(resources_results.last.name).to eq(topic_name)
expect(resources_results.last.configs.size).to be > 25
expect(resources_results.last.configs.first.name).to eq("compression.type")
expect(resources_results.last.configs.first.value).to eq("producer")
topic_config = resources_results.last.configs.find { |c| c.name == "compression.type" }
expect(topic_config).not_to be_nil
expect(topic_config.value).to eq("producer")
end
end
end
Expand Down
3 changes: 2 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
config.before(:suite) do
admin = KafkaConfigHelpers.rdkafka_config.admin
{
TestTopics.example_topic => 1
TestTopics.example_topic => 1,
"test" => 1
}.each do |topic, partitions|
create_topic_handle = admin.create_topic(topic, partitions, 1)
begin
Expand Down
Loading