Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
fix last few skips
Browse files Browse the repository at this point in the history
  • Loading branch information
emmettbutler committed Jul 24, 2018
1 parent 870b602 commit f771c04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion tests/pykafka/test_producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,10 @@ def test_async_produce_queue_full(self):
while consumer.consume() is not None:
time.sleep(.05)

@pytest.mark.skipif(RDKAFKA, reason="rdkafka uses different lingering mechanism")
def test_async_produce_lingers(self):
"""Ensure that the context manager waits for linger_ms milliseconds"""
if self.USE_RDKAFKA:
pytest.skip("rdkafka uses different lingering mechanism")
linger = 3
consumer = self._get_consumer()
with self._get_producer(linger_ms=linger * 1000) as producer:
Expand Down
8 changes: 4 additions & 4 deletions tests/pykafka/utils/test_compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def test_snappy_xerial(self):
decoded = compression.decode_snappy(encoded)
self.assertEqual(self.text, decoded)

@pytest.mark.skipif(platform.python_implementation() == "PyPy",
reason="PyPy fails to compress large messages with Snappy")
def test_snappy_large_payload(self):
if platform.python_implementation() == "PyPy":
pytest.skip("PyPy fails to compress large messages with Snappy")
payload = b''.join([uuid4().bytes for i in range(10)])
c = compression.encode_snappy(payload)
self.assertEqual(compression.decode_snappy(c), payload)
Expand All @@ -46,9 +46,9 @@ def test_lz4(self):
decoded = compression.decode_lz4(encoded)
self.assertEqual(self.text, decoded)

@pytest.mark.skipif(platform.python_implementation() == "PyPy",
reason="lz4f is currently unsupported with PyPy")
def test_lz4f(self):
if platform.python_implementation() == "PyPy":
pytest.skip("lz4f is currently unsupported with PyPy")
encoded = lz4f.compressFrame(self.text)
self.assertNotEqual(self.text, encoded)

Expand Down

0 comments on commit f771c04

Please sign in to comment.