mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-02-07 00:47:39 -08:00
It was necessary to apply patch to fix tests with py3.11. The patch was sent to upstream [1]. [1] https://github.com/dpkp/kafka-python/pull/2358 Closes: https://bugs.gentoo.org/896790 Signed-off-by: Petr Vaněk <arkamar@atlas.cz> Closes: https://github.com/gentoo/gentoo/pull/30043 Signed-off-by: Sam James <sam@gentoo.org>
27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
Fix tests for Py3.11
|
|
|
|
Upstream-PR: https://github.com/dpkp/kafka-python/pull/2358
|
|
|
|
diff --git a/test/test_assignors.py b/test/test_assignors.py
|
|
index 67e91e131..a1214d8fa 100644
|
|
--- a/test/test_assignors.py
|
|
+++ b/test/test_assignors.py
|
|
@@ -661,7 +661,7 @@ def test_reassignment_with_random_subscriptions_and_changes(mocker, execution_nu
|
|
|
|
subscriptions = defaultdict(set)
|
|
for i in range(n_consumers):
|
|
- topics_sample = sample(all_topics, randint(1, len(all_topics) - 1))
|
|
+ topics_sample = sample(sorted(all_topics), randint(1, len(all_topics) - 1))
|
|
subscriptions['C{}'.format(i)].update(topics_sample)
|
|
|
|
member_metadata = make_member_metadata(subscriptions)
|
|
@@ -671,7 +671,7 @@ def test_reassignment_with_random_subscriptions_and_changes(mocker, execution_nu
|
|
|
|
subscriptions = defaultdict(set)
|
|
for i in range(n_consumers):
|
|
- topics_sample = sample(all_topics, randint(1, len(all_topics) - 1))
|
|
+ topics_sample = sample(sorted(all_topics), randint(1, len(all_topics) - 1))
|
|
subscriptions['C{}'.format(i)].update(topics_sample)
|
|
|
|
member_metadata = {}
|