Closed muzarski closed 11 months ago
v2: Rebased on top of master. Fixed review comments, including:
./tools/cassandra-stress-ci.sh
, so the developers may easily simulate the CI runcassandra-stress-ci.sh
in README.md
PEP-8
formatting to all of the python scriptsCqlStressCassandraStress
class. It inherits from CSCliRunner
along with CassandraStress
cassandra-download
directory to .gitignore
../tools/cassandra-stress-ci.sh
are now printed only in the GH actions environment (when CI
env variable is set).We still don't make use of the pytest
framework. I need to get familiar with the framework, but don't want to delay the review process of the things that are already fixed.
v4: rebased on top of master
v5:
using pytest
to define test-cases
v6:
test_cs_*
scripts, as test cases can be defined with pytest
. Previous solution was a bit confusing since it let the user run the test using both CLI and pytest
. We decided to be more consistent and be able to define test cases using only pytest
.pytest.fixture
s next to test cases so we can bind test arguments to test functionsTestKeyspaces
to Keyspaces
since pytest
might consider it as a test class (when it's a pure utility class)CSCliRuntimeArguments
structure to define workload size and concurrency. It's useful when defining new test cases which do not use the default runtime arguments (workload_size=100
, concurrency=1
).
Motivation
Core logic of cassandra-stress frontend has already been implemented, but there are no tests verifying the correctness of our solution.
This PR introduces two tests written in python which test runtime logic of
cql-stress-cassandra-stress
tool.Changes
tools/test_with_scylla.py
python scriptdocker/scylla_test/compose.yml
docker-compose yaml defining a scylla node used during the testsScyllaDockerNode
, as well as the logic corresponding to this type, totools/util/scylla_docker.py
scylla_docker
function now makes use ofdocker compose
to set up the container. Thanks todocker-compose up --wait
flag, we can get rid of part of the code responsible for polling the scylla container until it's healthy.tools/util/cassandra_stress.py
which defines set of utility functions when working with cassandra-stresstools
directory. Included these tests in CIREADME.md