Skip to content

Commit

Permalink
Narrow down the cause of test timeout in test/test_producer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
orange-kao committed Aug 16, 2024
1 parent 1608037 commit 97887e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


@pytest.mark.skipif(env_kafka_version() <= (0, 8, 2) and sys.version_info > (3, 11), reason="Kafka 0.8.2 and earlier not supported by 3.12")
def test_buffer_pool():
def xtest_buffer_pool():
pool = SimpleBufferPool(1000, 1000)

buf1 = pool.allocate(1000, 1000)
Expand All @@ -26,7 +26,7 @@ def test_buffer_pool():
@pytest.mark.skipif(not env_kafka_version(), reason="No KAFKA_VERSION set")
@pytest.mark.skipif(env_kafka_version() <= (0, 8, 2) and sys.version_info > (3, 11), reason="Kafka 0.8.2 and earlier not supported by 3.12")
@pytest.mark.parametrize("compression", [None, 'gzip', 'snappy', 'lz4', 'zstd'])
def test_end_to_end(kafka_broker, compression):
def xtest_end_to_end(kafka_broker, compression):
if compression == 'lz4':
if env_kafka_version() < (0, 8, 2):
pytest.skip('LZ4 requires 0.8.2')
Expand Down Expand Up @@ -73,7 +73,7 @@ def test_end_to_end(kafka_broker, compression):
@pytest.mark.skipif(platform.python_implementation() != 'CPython',
reason='Test relies on CPython-specific gc policies')
@pytest.mark.skipif(env_kafka_version() <= (0, 8, 2) and sys.version_info > (3, 11), reason="Kafka 0.8.2 and earlier not supported by 3.12")
def test_kafka_producer_gc_cleanup():
def xtest_kafka_producer_gc_cleanup():
gc.collect()
threads = threading.active_count()
producer = KafkaProducer(api_version='0.9') # set api_version explicitly to avoid auto-detection
Expand All @@ -85,7 +85,7 @@ def test_kafka_producer_gc_cleanup():

@pytest.mark.skipif(not env_kafka_version(), reason="No KAFKA_VERSION set")
@pytest.mark.skipif(env_kafka_version() <= (0, 8, 2) and sys.version_info > (3, 11), reason="Kafka 0.8.2 and earlier not supported by 3.12")
@pytest.mark.parametrize("compression", [None, 'gzip', 'snappy', 'lz4', 'zstd'])
@pytest.mark.parametrize("compression", ['gzip', 'snappy', 'lz4', 'zstd'])
def test_kafka_producer_proper_record_metadata(kafka_broker, compression):
if compression == 'zstd' and env_kafka_version() < (2, 1, 0):
pytest.skip('zstd requires 2.1.0 or more')
Expand Down

0 comments on commit 97887e0

Please sign in to comment.