some settings were removed in C 2.1

This commit is contained in:
Jon Haddad
2014-10-07 18:18:46 -07:00
parent 10810942a4
commit 1d561a80ea

View File

@@ -149,19 +149,22 @@ class TablePropertiesTests(BaseCassEngTestCase):
'caching': CACHING_ALL, 'caching': CACHING_ALL,
'comment': 'TxfguvBdzwROQALmQBOziRMbkqVGFjqcJfVhwGR', 'comment': 'TxfguvBdzwROQALmQBOziRMbkqVGFjqcJfVhwGR',
'gc_grace_seconds': 2063, 'gc_grace_seconds': 2063,
'populate_io_cache_on_flush': True,
'read_repair_chance': 0.17985, 'read_repair_chance': 0.17985,
'replicate_on_write': False
# For some reason 'dclocal_read_repair_chance' in CQL is called # For some reason 'dclocal_read_repair_chance' in CQL is called
# just 'local_read_repair_chance' in the schema table. # just 'local_read_repair_chance' in the schema table.
# Source: https://issues.apache.org/jira/browse/CASSANDRA-6717 # Source: https://issues.apache.org/jira/browse/CASSANDRA-6717
# TODO: due to a bug in the native driver i'm not seeing the local read repair chance show up # TODO: due to a bug in the native driver i'm not seeing the local read repair chance show up
# 'local_read_repair_chance': 0.50811, # 'local_read_repair_chance': 0.50811,
} }
if CASSANDRA_VERSION <= 20:
expected['replicate_on_write'] = False
if CASSANDRA_VERSION == 20:
expected['populate_io_cache_on_flush'] = True
expected['index_interval'] = 98706
if CASSANDRA_VERSION >= 20: if CASSANDRA_VERSION >= 20:
expected['default_time_to_live'] = 4756 expected['default_time_to_live'] = 4756
expected['index_interval'] = 98706
expected['memtable_flush_period_in_ms'] = 43681 expected['memtable_flush_period_in_ms'] = 43681
self.assertDictContainsSubset(expected, management.get_table_settings(ModelWithTableProperties).options) self.assertDictContainsSubset(expected, management.get_table_settings(ModelWithTableProperties).options)
@@ -190,16 +193,21 @@ class TablePropertiesTests(BaseCassEngTestCase):
'caching': CACHING_NONE, 'caching': CACHING_NONE,
'comment': 'xirAkRWZVVvsmzRvXamiEcQkshkUIDINVJZgLYSdnGHweiBrAiJdLJkVohdRy', 'comment': 'xirAkRWZVVvsmzRvXamiEcQkshkUIDINVJZgLYSdnGHweiBrAiJdLJkVohdRy',
'gc_grace_seconds': 96362, 'gc_grace_seconds': 96362,
'populate_io_cache_on_flush': False,
'read_repair_chance': 0.2989, 'read_repair_chance': 0.2989,
'replicate_on_write': True # TODO see above comment re: native driver missing local read repair chance #'local_read_repair_chance': 0.12732,
# 'local_read_repair_chance': 0.12732,
} }
if CASSANDRA_VERSION >= 20: if CASSANDRA_VERSION >= 20:
expected['memtable_flush_period_in_ms'] = 60210 expected['memtable_flush_period_in_ms'] = 60210
expected['default_time_to_live'] = 65178 expected['default_time_to_live'] = 65178
if CASSANDRA_VERSION == 20:
expected['index_interval'] = 94207 expected['index_interval'] = 94207
# these featuers removed in cassandra 2.1
if CASSANDRA_VERSION <= 20:
expected['replicate_on_write'] = True
expected['populate_io_cache_on_flush'] = False
self.assertDictContainsSubset(expected, table_settings) self.assertDictContainsSubset(expected, table_settings)