Skip to content

Commit 2d67e7a

Browse files
committed
fix tests
1 parent 1f8323f commit 2d67e7a

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

requirements/requirements-tests.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ requests-mock
99
respx
1010
pytest_cov
1111
pytest-asyncio
12+
async-timeout

tests/common/_async/__init__.py

Whitespace-only changes.

tests/common/_async/consumer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18-
18+
import sys
1919
import asyncio
20+
if sys.version_info >= (3, 11):
21+
from asyncio import timeout
22+
else:
23+
from async_timeout import timeout
2024

2125
from confluent_kafka.cimpl import Consumer
2226
from confluent_kafka.error import ConsumeError, KeyDeserializationError, ValueDeserializationError

tests/integration/integration_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import gc
2929
import struct
3030
import re
31+
import pytest
3132

3233
import confluent_kafka
3334

@@ -212,7 +213,7 @@ def verify_producer():
212213
# Global variable to track garbage collection of suppressed on_delivery callbacks
213214
DrOnlyTestSuccess_gced = 0
214215

215-
216+
@pytest.mark.skip(reason="This module must be run as a script")
216217
def test_producer_dr_only_error():
217218
"""
218219
The C delivery.report.only.error configuration property

0 commit comments

Comments
 (0)