From 194ad8a22315f0410155ab5eb2283d006a4fdd37 Mon Sep 17 00:00:00 2001 From: Marcus Eriksson Date: Mon, 23 Jul 2018 10:03:17 +0200 Subject: [PATCH] compact storage when testing thrift Patch by marcuse; reviewed by Jason Brown for CASSANDRA-14583 --- write_failures_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/write_failures_test.py b/write_failures_test.py index ece6245db5..bb2deb8ed1 100644 --- a/write_failures_test.py +++ b/write_failures_test.py @@ -42,7 +42,7 @@ def fixture_set_test_defauls(self, fixture_dtest_setup): self.consistency_level = ConsistencyLevel.ALL self.failing_nodes = [1, 2] - def _prepare_cluster(self, start_rpc=False): + def _prepare_cluster(self, start_rpc=False, compact_storage=False): self.cluster.populate(3) if start_rpc: @@ -59,7 +59,7 @@ def _prepare_cluster(self, start_rpc=False): """ % (KEYSPACE, self.replication_factor)) session.set_keyspace(KEYSPACE) - session.execute("CREATE TABLE IF NOT EXISTS mytable (key text PRIMARY KEY, value text)") + session.execute("CREATE TABLE IF NOT EXISTS mytable (key text PRIMARY KEY, value text) %s"%("WITH COMPACT STORAGE" if compact_storage else '')) session.execute("CREATE TABLE IF NOT EXISTS countertable (key uuid PRIMARY KEY, value counter)") for idx in self.failing_nodes: @@ -214,7 +214,7 @@ def test_thrift(self): """ A thrift client receives a TimedOutException """ - self._prepare_cluster(start_rpc=True) + self._prepare_cluster(start_rpc=True, compact_storage=True) self.expected_expt = thrift_types.TimedOutException client = get_thrift_client()