Skip to content

bump librdkafka to 2.11.0 #126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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 librdkafka
Submodule librdkafka updated 158 files
2 changes: 1 addition & 1 deletion tests/consumer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ local function test_seek_partitions()
local out = consumer:output()

for _ = 1, 5 do
local msg = out:get(3)
local msg = out:get(10)
if msg == nil then
error('Message is not delivered')
end
Expand Down
32 changes: 20 additions & 12 deletions tests/test_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,15 @@ def test_consumer_should_completely_unsubscribe_from_topics():
"value": "test34"
}

write_into_kafka("test_unsubscribe", (message1, message2))
t = f"test_unsubscribe_{randomword(4)}"
write_into_kafka(t, (message1, message2))

server = get_server()

with create_consumer(server, KAFKA_HOST, {"group.id": "should_completely_unsubscribe_from_topics"}):
server.call("consumer.subscribe", [["test_unsubscribe"]])
with create_consumer(server, KAFKA_HOST, {
"group.id": "should_completely_unsubscribe_from_topics",
}):
server.call("consumer.subscribe", [[t]])

response = server.call("consumer.consume", [10])[0]

Expand All @@ -225,9 +228,9 @@ def test_consumer_should_completely_unsubscribe_from_topics():
"test2",
}

server.call("consumer.unsubscribe", [["test_unsubscribe"]])
server.call("consumer.unsubscribe", [[t]])

write_into_kafka("test_unsubscribe", (message3, ))
write_into_kafka(t, (message3, ))

response = server.call("consumer.consume", [10])

Expand Down Expand Up @@ -257,11 +260,16 @@ def test_consumer_should_partially_unsubscribe_from_topics():

server = get_server()

with create_consumer(server, KAFKA_HOST, {"group.id": "should_partially_unsubscribe_from_topics"}):
server.call("consumer.subscribe", [["test_unsub_partially_1", "test_unsub_partially_2"]])
salt = randomword(4)
with create_consumer(server, KAFKA_HOST, {
"group.id": f"should_partially_unsubscribe_from_topics_{salt}",
}):
t1 = f"test_unsub_partially_{salt}_1"
t2 = f"test_unsub_partially_{salt}_2"
server.call("consumer.subscribe", [[t1, t2]])

write_into_kafka("test_unsub_partially_1", (message1, ))
write_into_kafka("test_unsub_partially_2", (message2, ))
write_into_kafka(t1, (message1, ))
write_into_kafka(t2, (message2, ))
time.sleep(5)

# waiting up to 30 seconds
Expand All @@ -272,10 +280,10 @@ def test_consumer_should_partially_unsubscribe_from_topics():
"test2",
}

server.call("consumer.unsubscribe", [["test_unsub_partially_1"]])
server.call("consumer.unsubscribe", [[t1]])

write_into_kafka("test_unsub_partially_1", (message3, ))
write_into_kafka("test_unsub_partially_2", (message4, ))
write_into_kafka(t1, (message3, ))
write_into_kafka(t2, (message4, ))
time.sleep(5)

response = server.call("consumer.consume", [30])[0]
Expand Down
Loading