Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sylwiaszunejko committed May 14, 2024
1 parent adc449e commit 78abc29
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions pylib/cqlshlib/test/test_cqlsh_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ def test_describe_columnfamily_output(self):
varintcol varint
) WITH additional_write_policy = '99p'
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND caching = {'keys': 'ALL','rows_per_partition': 'NONE'}
AND cdc = false
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
Expand All @@ -686,7 +686,7 @@ def test_describe_columnfamily_output(self):

scylla_table_desc = dedent("""
CREATE TABLE %s.has_all_types (
num int PRIMARY KEY,
num int,
asciicol ascii,
bigintcol bigint,
blobcol blob,
Expand All @@ -701,21 +701,24 @@ def test_describe_columnfamily_output(self):
tinyintcol tinyint,
uuidcol uuid,
varcharcol text,
varintcol varint
varintcol varint,
PRIMARY KEY (num)
) WITH bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
AND caching = {'keys': 'ALL','rows_per_partition': 'ALL'}
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.0
AND crc_check_chance = 1
AND dclocal_read_repair_chance = 0
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
AND read_repair_chance = 0
AND speculative_retry = '99.0PERCENTILE'
AND paxos_grace_seconds = 864000
AND tombstone_gc = {'mode': 'timeout', 'propagation_delay_in_seconds': '3600'};
""" % quote_name(get_keyspace()))

if self.is_scylla:
Expand Down Expand Up @@ -792,8 +795,9 @@ def test_describe_cluster_output(self):
output_re_client = r'''(?x)
^
\n
Cluster: [ ] (?P<clustername> .* ) \n
Partitioner: [ ] (?P<partitionername> .* ) \n
Cluster: [ ] (?P<clustername> .* )\n
Partitioner: [ ] (?P<partitionername> .* )\n
Snitch: [ ] (?P<snitchname> .* )\n
\n
'''

Expand Down Expand Up @@ -997,23 +1001,25 @@ def test_scylla_tags(self):

expected = dedent(f"""
CREATE TABLE {ks}.ccc (
pkey int PRIMARY KEY
pkey int,
PRIMARY KEY (pkey)
) WITH bloom_filter_fp_chance = 0.01
AND caching = {{'keys': 'ALL', 'rows_per_partition': 'ALL'}}
AND caching = {{'keys': 'ALL','rows_per_partition': 'ALL'}}
AND comment = ''
AND compaction = {{'class': 'SizeTieredCompactionStrategy'}}
AND compression = {{'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.0
AND crc_check_chance = 1
AND dclocal_read_repair_chance = 0
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
cdc = {{'delta': 'full', 'enabled': 'true', 'postimage': 'false', 'preimage': 'false', 'ttl': '86400'}}
AND read_repair_chance = 0
AND speculative_retry = '99.0PERCENTILE'
AND paxos_grace_seconds = 864000
AND tombstone_gc = {{'mode':'timeout','propagation_delay_in_seconds': '3600'}}
AND cdc = {{'delta':'full','enabled':'true','postimage':'false','preimage':'false','ttl':'86400'}};
""")

with testrun_cqlsh(tty=True, env=self.default_env) as c:
Expand Down

0 comments on commit 78abc29

Please sign in to comment.