diff --git a/unit_tests/test_cassandra_stress_thread.py b/unit_tests/test_cassandra_stress_thread.py index 6b8edca922..b66e05e226 100644 --- a/unit_tests/test_cassandra_stress_thread.py +++ b/unit_tests/test_cassandra_stress_thread.py @@ -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