mirror of https://github.com/apache/cassandra
Ninja-fix 1.2 system tests
This commit is contained in:
parent
81e19fc78b
commit
68da4b4689
|
|
@ -964,8 +964,7 @@ class TestMutations(ThriftTester):
|
|||
client.insert(key, ColumnParent('Standard1'), Column(key, 'v', 0), ConsistencyLevel.ONE)
|
||||
|
||||
slices = get_range_slice(client, ColumnParent('Standard1'), SlicePredicate(column_names=['-a', '-a']), '', '', 1000, ConsistencyLevel.ONE)
|
||||
# note the collated ordering rather than ascii
|
||||
L = ['0', '1', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '2', '20', '21', '22', '23', '24', '25', '26', '27','28', '29', '3', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '4', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '5', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '6', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '7', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '8', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '9', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', 'a', '-a', 'b', '-b']
|
||||
L = ['-a', '-b', '0', '1', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '2', '20', '21', '22', '23', '24', '25', '26', '27','28', '29', '3', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '4', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '5', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '6', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '7', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '8', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '9', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', 'a', 'b']
|
||||
assert len(slices) == len(L)
|
||||
for key, ks in zip(L, slices):
|
||||
assert key == ks.key
|
||||
|
|
@ -982,10 +981,10 @@ class TestMutations(ThriftTester):
|
|||
assert key == ks.key
|
||||
|
||||
slices = get_range_slice(client, ColumnParent('Standard1'), SlicePredicate(column_names=['-a', '-a']), 'a', '', 1000, ConsistencyLevel.ONE)
|
||||
check_slices_against_keys(['a', '-a', 'b', '-b'], slices)
|
||||
check_slices_against_keys(['a', 'b'], slices)
|
||||
|
||||
slices = get_range_slice(client, ColumnParent('Standard1'), SlicePredicate(column_names=['-a', '-a']), '', '15', 1000, ConsistencyLevel.ONE)
|
||||
check_slices_against_keys(['0', '1', '10', '11', '12', '13', '14', '15'], slices)
|
||||
check_slices_against_keys(['-a', '-b', '0', '1', '10', '11', '12', '13', '14', '15'], slices)
|
||||
|
||||
slices = get_range_slice(client, ColumnParent('Standard1'), SlicePredicate(column_names=['-a', '-a']), '50', '51', 1000, ConsistencyLevel.ONE)
|
||||
check_slices_against_keys(['50', '51'], slices)
|
||||
|
|
@ -1110,7 +1109,7 @@ class TestMutations(ThriftTester):
|
|||
assert [row.key for row in result] == ['a', 'b', 'c', 'd', 'e',], [row.key for row in result]
|
||||
|
||||
result = client.get_range_slices(cp, SlicePredicate(column_names=['col1', 'col3']), KeyRange(start_token=copp_token('c'), end_token=copp_token('c')), ConsistencyLevel.ONE)
|
||||
assert [row.key for row in result] == ['d', 'e', 'a', 'b', 'c',], [row.key for row in result]
|
||||
assert [row.key for row in result] == ['a', 'b', 'c', 'd', 'e',], [row.key for row in result]
|
||||
|
||||
|
||||
def test_get_slice_by_names(self):
|
||||
|
|
@ -1194,7 +1193,7 @@ class TestMutations(ThriftTester):
|
|||
|
||||
def test_describe_keyspace(self):
|
||||
kspaces = client.describe_keyspaces()
|
||||
assert len(kspaces) == 3, kspaces # ['Keyspace2', 'Keyspace1', 'system']
|
||||
assert len(kspaces) == 5, kspaces # ['Keyspace2', 'Keyspace1', 'system', 'system_traces', 'system_auth']
|
||||
|
||||
sysks = client.describe_keyspace("system")
|
||||
assert sysks in kspaces
|
||||
|
|
@ -1227,7 +1226,7 @@ class TestMutations(ThriftTester):
|
|||
|
||||
def test_describe_partitioner(self):
|
||||
# Make sure this just reads back the values from the config.
|
||||
assert client.describe_partitioner() == "org.apache.cassandra.dht.CollatingOrderPreservingPartitioner"
|
||||
assert client.describe_partitioner() == "org.apache.cassandra.dht.ByteOrderedPartitioner"
|
||||
|
||||
def test_describe_snitch(self):
|
||||
assert client.describe_snitch() == "org.apache.cassandra.locator.SimpleSnitch"
|
||||
|
|
@ -1397,7 +1396,6 @@ class TestMutations(ThriftTester):
|
|||
ks1 = client.describe_keyspace('Keyspace1')
|
||||
assert 'NewColumnFamily' in [x.name for x in ks1.cf_defs]
|
||||
cfid = [x.id for x in ks1.cf_defs if x.name=='NewColumnFamily'][0]
|
||||
assert cfid > 1000
|
||||
|
||||
# modify invalid
|
||||
modified_cf = CfDef('Keyspace1', 'NewColumnFamily', column_metadata=[cd])
|
||||
|
|
|
|||
Loading…
Reference in New Issue