smiklosovic commented on code in PR #207:
URL: https://github.com/apache/cassandra-dtest/pull/207#discussion_r1136840241
##########
compaction_test.py:
##########
@@ -293,45 +250,23 @@ def test_compaction_throughput(self):
assert float(threshold) + 0.5 >= avgthroughput_mb
@pytest.mark.parametrize("strategy", strategies)
+ @since('2.0', max_version='4.1')
def test_compaction_strategy_switching(self, strategy):
"""
Ensure that switching strategies does not result in problems.
Insert data, switch strategies, then check against data loss.
"""
- strategies = ['LeveledCompactionStrategy',
'SizeTieredCompactionStrategy', 'DateTieredCompactionStrategy']
-
- if strategy in strategies:
- strategies.remove(strategy)
- cluster = self.cluster
- cluster.populate(1).start()
- [node1] = cluster.nodelist()
-
- for strat in strategies:
- session = self.patient_cql_connection(node1)
- create_ks(session, 'ks', 1)
-
- session.execute("create table ks.cf (key int PRIMARY KEY, val
int) with gc_grace_seconds = 0 and compaction= {'class':'" + strategy + "'};")
-
- for x in range(0, 100):
- session.execute('insert into ks.cf (key, val) values (' +
str(x) + ',1)')
-
- node1.flush()
-
- for x in range(0, 10):
- session.execute('delete from cf where key = ' + str(x))
+ compaction_strategy_switching(self, strategy,
['LeveledCompactionStrategy', 'SizeTieredCompactionStrategy',
'DateTieredCompactionStrategy'])
- session.execute("alter table ks.cf with compaction =
{'class':'" + strat + "'};")
-
- for x in range(11, 100):
- assert_one(session, "select * from ks.cf where key =" +
str(x), [x, 1])
-
- for x in range(0, 10):
- assert_none(session, 'select * from cf where key = ' +
str(x))
-
- node1.flush()
- cluster.clear()
- time.sleep(5)
- cluster.start()
+ @pytest.mark.parametrize("strategy", strategies_without_dtcs)
+ @since('5.0')
Review Comment:
@driftx nothing, but we do not need to run that, because there is the test
above for switching over all of them. This is just a subset to switch over so
we do not gain anything, just spending time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]