Skip to content

Commit

Permalink
Add basic test for cassandra-stress
Browse files Browse the repository at this point in the history
patch by Jay Zhuang; reviewed by Stefania Alborghetti for CASSANDRA-14616
  • Loading branch information
jay-zhuang committed Dec 7, 2018
1 parent c0d9c97 commit 325ef3f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions stress_tool_test.py
Expand Up @@ -54,3 +54,19 @@ def distribution_template(self, ratio_spec, expected_ratio, delta):
num_results = sum(len(row) for row in written)

assert abs(float(num_nones) / num_results - expected_ratio) <= delta


@since('3.0')
class TestStressWrite(Tester):

@pytest.mark.timeout(3 * 60)
def test_quick_write(self):
"""
@jira_ticket CASSANDRA-14890
A simple write stress test should be done very quickly
"""
self.cluster.populate(1).start(wait_for_binary_proto=True)
node = self.cluster.nodelist()[0]
node.stress(['write', 'err<0.9', 'n>1', '-rate', 'threads=1'])
out, err, _ = node.run_cqlsh('describe table keyspace1.standard1')
assert 'standard1' in out

0 comments on commit 325ef3f

Please sign in to comment.