Skip to content

Commit

Permalink
test(integration): add compression tests for c-s
Browse files Browse the repository at this point in the history
since we run into issues c-s around snappy compression
we should have a set of tests that can help us identify
those kind of issues
  • Loading branch information
fruch committed Aug 28, 2024
1 parent 7e7e44e commit 145a4d6
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions unit_tests/test_cassandra_stress_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,33 @@ def cleanup_thread():

assert "latency 99th percentile" in output[0]
assert float(output[0]["latency 99th percentile"]) > 0


@pytest.mark.parametrize("compressor, cql_compression", [
("Deflate", "none"), ("LZ4", "lz4"), ("Snappy", "snappy"), ("Zstd", "none")
])
def test_05_cassandra_stress_compression(request, docker_scylla, params, compressor, cql_compression):
loader_set = LocalLoaderSetDummy(params=params)

cmd = (
"cassandra-stress write cl=ONE duration=5s -schema 'replication(strategy=NetworkTopologyStrategy,replication_factor=1) "
f"compression={compressor}Compressor' -mode cql3 native compression={cql_compression.lower()} -rate threads=1"
)

cs_thread = CassandraStressThread(
loader_set, cmd, node_list=[docker_scylla], timeout=120, params=params
)

def cleanup_thread():
cs_thread.kill()

request.addfinalizer(cleanup_thread)

cs_thread.run()

output = cs_thread.get_results()
assert "latency mean" in output[0]
assert float(output[0]["latency mean"]) > 0

assert "latency 99th percentile" in output[0]
assert float(output[0]["latency 99th percentile"]) > 0

0 comments on commit 145a4d6

Please sign in to comment.