Repository navigation
Wait for the new topic in the describe_topics integration test - #1069
Merged
Merged
Conversation
mensfeld
approved these changes
Oct 24, 2026
mensfeld
added a commit
that referenced
this pull request
Oct 28, 2026
… spec RSS noise (#1075) Ports generic spec fixes from karafka-rdkafka that rdkafka-ruby does not have yet: - karafka#580: give the `Consumer#lag` spec the same 30 s list offsets wait (`consumer.lag(list, 30_000)`) as its siblings. - karafka-rdkafka 5db5409: retry the `#poll_nb returns a message if there is one` spec on a 30 s deadline instead of a fixed ~2 s (10 attempts), so a loaded runner does not fail it before the fetch lands. It still stops as soon as a message arrives. - karafka-rdkafka cc9e2b8/84027a6: stabilize `consumer_memberid_clusterid_leak_spec.rb` against RSS noise on Ruby 4.0. It compacts the heap before each RSS sample and runs 400k calls (a leak would be ~11.4 MB) against a 5 MB ceiling, instead of 200k calls against 2 MB. Locally on Ruby 4.0.7 the leak-free delta was 2,496 KB, which the old 2 MB ceiling would have failed. Everything else merged recently in karafka-rdkafka is either already here (#566/#567 as #1062, #581 as #1070, #582 as #1069) or a port from this repo. The share consumer (KIP-932) and librdkafka patches stay fork-only. Testing (local, Ruby 4.0.7, librdkafka 2.16.0): - Full `spec/lib` suite: 744 examples, 0 failures. - `consumer_memberid_clusterid_leak_spec.rb` passes. - `rubocop` is clean on the changed files. The counterpart karafka-rdkafka branch is sync-from-rdkafka-ruby-2026-10-27.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
49765
spec/integrations/admin_describe_topics_spec.rbcalleddescribe_topicsright aftercreate_topic(...).wait. The new topic can still be missing from the broker's metadata at that point, so the test could fail withunknown_topic_or_partfor the topic it just created.Add a
describe_topics_settledhelper that retries only while the new topic reportsunknown_topic_or_part, for at most 10 s. Any other error, or a topic still unknown after the deadline, still fails the test. Same fix as karafka#582 (the file is identical to that PR's version).The
spec/lib#describe_topicsspecs are not affected:spec/support/admin_topic_auto_wait.rbalready waits for the topic after everycreate_topic(...).wait. No other spec callsdescribe_topicsaftercreate_topic.Test-only change: no CHANGELOG entry.
Verification (local, plain
docker-compose.ymlbroker)unknown_topic_or_part, head passes.bundle exec rspec): 743 examples, 0 failures.docker-compose-ssl.yml; CI's complementary workflows run it there.Performance impact
none (test-only).