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: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- '3.3'
- '3.2'
- '3.1'
- 'jruby-9.4'
include:
- ruby: '3.4'
coverage: 'true'
Expand Down Expand Up @@ -73,6 +74,7 @@ jobs:
- '3.3'
- '3.2'
- '3.1'
- 'jruby-9.4'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 0.21.1 (Unreleased)
- [Enhancement] Support producing and consuming of headers with mulitple values (KIP-82).
- [Enhancement] Allow native Kafka customization poll time.
- [Enhancement] Roll out experimental jruby support.

## 0.21.0 (2025-02-13)
- [Enhancement] Bump librdkafka to `2.8.0`
Expand Down
22 changes: 12 additions & 10 deletions spec/rdkafka/admin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -738,17 +738,19 @@
end
end

context "when operating from a fork" do
# @see https://github.com/ffi/ffi/issues/1114
it 'expect to be able to create topics and run other admin operations without hanging' do
# If the FFI issue is not mitigated, this will hang forever
pid = fork do
admin
.create_topic(topic_name, topic_partition_count, topic_replication_factor)
.wait
end
unless RUBY_PLATFORM == 'java'
context "when operating from a fork" do
# @see https://github.com/ffi/ffi/issues/1114
it 'expect to be able to create topics and run other admin operations without hanging' do
# If the FFI issue is not mitigated, this will hang forever
pid = fork do
admin
.create_topic(topic_name, topic_partition_count, topic_replication_factor)
.wait
end

Process.wait(pid)
Process.wait(pid)
end
end
end
end
9 changes: 0 additions & 9 deletions spec/rdkafka/bindings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,6 @@
end

describe "oauthbearer set token" do

context "without args" do
it "should raise argument error" do
expect {
Rdkafka::Bindings.rd_kafka_oauthbearer_set_token
}.to raise_error(ArgumentError)
end
end

context "with args" do
before do
DEFAULT_TOKEN_EXPIRY_SECONDS = 900
Expand Down
32 changes: 17 additions & 15 deletions spec/rdkafka/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,25 @@
expect(log.string).to include "FATAL -- : I love testing"
end

it "expect to start new logger thread after fork and work" do
reader, writer = IO.pipe

pid = fork do
$stdout.reopen(writer)
Rdkafka::Config.logger = Logger.new($stdout)
reader.close
producer = rdkafka_producer_config(debug: 'all').producer
producer.close
unless RUBY_PLATFORM == 'java'
it "expect to start new logger thread after fork and work" do
reader, writer = IO.pipe

pid = fork do
$stdout.reopen(writer)
Rdkafka::Config.logger = Logger.new($stdout)
reader.close
producer = rdkafka_producer_config(debug: 'all').producer
producer.close
writer.close
sleep(1)
end

writer.close
sleep(1)
Process.wait(pid)
output = reader.read
expect(output.split("\n").size).to be >= 20
end

writer.close
Process.wait(pid)
output = reader.read
expect(output.split("\n").size).to be >= 20
end
end

Expand Down